I applied SQL Server SP2 but SSMS displays 11.0.3153 still - sql-server

The SQL Server version I'm running is 2012 (11.0.3153) in our dev environment..
I've just applied SQL Server SP2 to my database but the version appears unchanged. I need the version level at 11.0.5058 to match our production.
There was no errors during the installation.
Any idea what's going on?
Select ##version shows:
Microsoft SQL Server 2012 (SP1) - 11.0.3153.0 (Intel X86)
Jul 22 2014 15:41:01
Copyright (c) Microsoft Corporation
Standard Edition on Windows NT 6.2 (Build 9200: ) (WOW64) (Hypervisor)
However I tried applying the patch again and I get this:
Upgrade Status: Installed.
There's not supposed to be a need for a restart but I'm doing that anyway.
Restart did not work either.

Related

Why does SELECT ##VERSION return previous version after installing new SQL Server

First I installed SQL Server 2012 for learning. Because it doesn't take too much memory.
But later I need a SQL Server for development so I installed the latest version of SQL Server 2019 Developer edition.
After installation, I check the version of SQL Server in SSMS using
SELECT ##VERSION
and I get:
Microsoft SQL Server 2012 - 11.0.2100.60 (X64) Feb 10 2012 19:39:15
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200:)
I don't know how to fix this.
If you already had SQL Server 2012 installed, then the SQL Server 2019 Developer edition wasn't installed as the "default, unnamed" instance - since there can only ever be one of those.
So when you installed SQL Server 2019, you must have chosen an instance name - use that instance name when connecting, e.g. use .\INSTANCE or (local)\INSTANCE to connect to the new version of SQL Server installed

SQL Server FORMAT with culture parameter not working

I am using SQL Server 2017 and try to use culture in the Format function. When running this Query on the server the result is incorrect:
SELECT ##VERSION --> Microsoft SQL Server 2017 (RTM-CU17) (KB4515579) - 14.0.3238.1 (X64) Sep 13 2019 15:49:57 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64
SELECT FORMAT(SYSDATETIME(), N'Y', 'fa'); --> February 2020
But when running this in another server with SQL server 2017 the script works fine:
SELECT ##VERSION --> Microsoft SQL Server 2017 (RTM-CU3-GDR) (KB4052987) - 14.0.3015.40 (X64) Dec 22 2017 16:13:22 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 10.0 <X64> (Build 16299: )
SELECT FORMAT(SYSDATETIME(), N'Y', 'fa'); --> بهمن, 1398
What has configuration must be checked?
P.S: I realized that this problem occurres on Windows Server 2012 R2 and lower versions.
Finally, I found the problem. This feature depends on the version of Windows which SQL server installed on it. Persian calendar was added in Windows Server 2012 R2 And Windows 10.
This image shows the date format for fa culture in Windows Server 2012 R2 and Windows 10
And this image shows the date format for fa culture in the older version of Windows
In fact, the problem is at Windows Server where the SQLServer is installed.
For any language you want to use, Windows Server must have this language installed at OS level.
To install in "Windows Server 2012 R2" or later, just follow these steps:
Search for "Control Panel" and open it
Select "View by: Large Icons"
Click on "Languages"
Add the Language you need, and after that also install the "Language Pack" for the new language added.
After this, your parameter in FORMAT function will be accepted.

Deploying SSIS Package to SQL Server 2016

I have an SSIS project in VS:
Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01590
SQL Server Data Tools 14.0.61116.0
Microsoft SQL Server Data Tools
SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5
Project > Properties > Configuration Properties > Deployment Target Version > TargetServerVersion = SQL Server 2016
I deployed and validated successfully on two SQL server instances, but cannot on a third.
The chief difference I see in the three instances is this:
First (success)
Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64)
Jul 5 2017 23:41:17
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows Server 2012 R2 Datacenter 6.3 (Build 9600: ) (Hypervisor)
Second (success)
Microsoft SQL Server 2016 (RTM-GDR) (KB4019088) - 13.0.1742.0 (X64) Jul 5 2017 23:41:17 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows Server 2012 Datacenter 6.2 (Build 9200: ) (Hypervisor)
Third (failed)
Microsoft SQL Server 2016 (SP1-CU5) (KB4040714) - 13.0.4451.0 (X64) Sep 5 2017 16:12:34 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Datacenter 6.3 (Build 9600: ) (Hypervisor)
I have been unable to track down fixes for the errors via Google, and they seem to be the same as when I target SQL Server 2014. I can post those as an edit if necessary, but my suspicion is the Sql Server installation (perhaps an issue specific to the Enterprise edition or something otherwise missing from that install) and not my package based on the above.
Here are the first and likely most relevant errors:
I found that this error goes away if you deploy from within Visual Studio instead of the wizard that is output by the build. However, I don't think you can connect to remote SQL Server instances when deploying from Visual Studio (I think that a Windows login is required).
So the solution was to install SSDT (Visual Studio 2015) on the production machine and deploy locally. This is obviously not great because you then have to move the SSDT project to the target machine every time you want to deploy (i use Git for this).
I'm sure Microsoft will come up with a fix for this eventually... Although at the moment I'm still waiting for them to release SSDT for Visual Studio 2017.
=== EDIT October 2017
SSDT is now available in Visual Studio 2017. However, I found that I still had to deploy from a locally running Visual Studio (but I can't remember why since having tried this a couple months ago from VS2017)

SQL2016 Not able to create Column Master Key

I just installed SQL 2016 Standard Edition because I wanted to use the 'Always Encrypted' feature.
However, when I tried to created a Column Master Key under Security->Always Encrypted Keys->Column Master Key, I got the following error:
productversion: 13.0.160.5, productlevel:RTM, edition:Standard Edition 64bit
Any ideas? Thanks!
I was having the same issue. I fixed it by updating to Sql Server 2016 SP1 from Sql Server 2016.
Previously ##version was:
Microsoft SQL Server 2016 (RTM-GDR) (KB3194716) - 13.0.1722.0 (X64) Sep 26 2016 13:17:23 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows 10 Pro 6.3 (Build 14393: )
Now ##version is:
Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows 10 Pro 6.3 (Build 14393: )
Note also that my SSMS is totally up to date.
Tools > Check for Updates > Details - 13.0.16100.1
A coworker has a slightly older build of SSMS and does not even see the option to encrypt columns.
The issue was probably caused by restoring a SQL2014 database. I backed up a 2014 database and then restored it in 2016. SQL may have seen it as a 2014 schema and therefore complained Column Master Key not supported.
How I resolved it: In SSMS 2016, generate .sql script for the imported database (in Advanced settings, choose SQL 2016 script)
Install a new SQL 2016 instance (which may not be necessary will test) and run the .sql generated, rather than the restore option
"Always Encrypted is available in SQL Server 2016 (13.x) and SQL Database. (Prior to SQL Server 2016 (13.x) SP1, Always Encrypted was limited to the Enterprise Edition.)"
Source: https://learn.microsoft.com/en-us/sql/relational-databases/security/encryption/always-encrypted-database-engine?view=sql-server-2017

SQL Server "Index Usage Statistics" report causes "incorrect syntax near ')'"

In SQL Server 2008 R2 Standard Edition:
SELECT ##version
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
with non-express edition tools:
Microsoft SQL Server Management Studio 10.50.2500.0
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML 3.0 6.0
Microsoft Internet Explorer 9.0.8112.16421
Microsoft .NET Framework 2.0.50727.5448
Operating System 6.1.7601
running on Windows Small Business Server 2011 Standard 64-bit:
Against a database in SQL Server 2000 compatibility mode:
If I try to run the Index Usage Statistics report I get the error:
How to make it go away?
I threw in every red herring I could think of. There should be enough extraneous information that everyone can throw out a theory.
The various reports in SQL Server Mgmt Studio make use of DMV (dynamic management views) like the sys.dm_db_index_usage_stats to fetch their data.
Those DMV are only available if you're running on compatibility level 90 (SQL Server 2005) and up. You won't be able to get this to work if you're stuck in SQL Server 2000 compatibility level (80), unfortunately.

Resources