Performance and Stability Related Fixes in Post-SQL Server 2012 SP3 Builds

As of August 8, 2017, there have been ten Cumulative Updates (CU) for the Service Pack 3 branch of SQL Server 2012. There have been a fairly high number of hotfixes in every one of these Cumulative Updates, as more people are using SQL Server 2012 Service Pack 3. If you are running SQL Server 2012 Service Pack 3, I really think you should be running the latest SQL Server 2012 Cumulative Update.

Table 1 shows the SQL Server 2012 SP3 CU builds that have been released so far.

BuildDescriptionRelease Date
11.0.6290SP3 RTMNovember 22, 2015
11.0.6518SP3 CU1January 18, 2016
11.0.6523SP3 CU2March 21, 2016
11.0.6537SP3 CU3May 16, 2016
11.0.6540SP3 CU4July 18, 2016
11.0.6544SP3 CU5September 20, 2016
11.0.6567SP3 CU6November 16, 2016
11.0.6579SP3 CU7January 17, 2017
11.0.6594SP3 CU8March 20, 2017
11.0.6598SP3 CU9May 15, 2017
11.0.6607SP3 CU10August 8, 2017
   

Table 1: SQL Server 2012 SP3 CU Builds

 

You can follow the KB article link below to see all of the CU builds for the SQL Server 2012 Service Pack 3 branch.

SQL Server 2012 SP3 Build Versions

Like I did for the SQL Server 2012 SP2 branch, I decided to scan the hotfix list for all of the Cumulative Updates in the SP3 branch, looking for performance and general reliability-related fixes for the SQL Server Database Engine. I came up with the list below, but this listing is completely arbitrary on my part. You may come up with a completely different list, based on what specific SQL Server 2012 features you are using.

Here are the fixes in the Service Pack 3 branch:

SQL Server 2012 SP3 Cumulative Update 1 (Build 11.0.6518), 8 total public hot fixes

FIX: You cannot use the Transport Layer Security protocol version 1.2 to connect to a server that is running SQL Server 2014 or SQL Server 2012

FIX: SQL Server may crash when a request for execution of a remote stored procedure contains incomplete definition of arguments

FIX: You receive error messages when you run a query that uses tempdb in SQL Server

An update to enable the “-k” startup parameter to control the rate that work files can spill to tempdb is available for SQL Server 2012 Service Pack 3

FIX: The CHANGETABLE function in a query returns incorrect results when Change Tracking is enabled for a SQL Server database

 

SQL Server 2012 SP3 Cumulative Update 2 (Build 11.0.6523), 20 total public hot fixes

FIX: Slow performance when you query numeric data types from an Oracle database

FIX: Access violation when you execute a stored procedure that uses a cursor on a table variable in SQL Server

FIX: An assertion failure occurs on the secondary replica when you use the AlwaysOn Availability Groups feature in SQL Server 2012

FIX: Numeric overflow when you run a query that spills more than 65,535 extents to tempdb in SQL Server 2014 or 2012

FIX: Column data is deleted when you update another column in a table in SQL Server 2012

FIX: SMK initialization fails on one node of a SQL Server 2012 failover cluster

FIX: SQL Server stops responding when you back up the certificate that is used to encrypt the database encryption key in SQL Server 2012 or SQL Server 2014

FIX: XA transactions aren’t cleaned when you exit a Java application in an instance of SQL Server

FIX: Error occurs when you try to drop or delete filegroups or partition schemes and functions in SQL Server

FIX: The Log Reader Agent stops intermittently and an Access Violation occurs in SQL Server 2012

FIX: Error when you use the replication feature in SQL Server 2014 or SQL Server 2012

FIX: Access violation and the program restarts when you change an extended events session in SQL Server 2014 or 2012

 

SQL Server 2012 SP3 Cumulative Update 3 (Build 11.0.6537), 23 total public hot fixes

FIX: You do not have the permissions to execute the system sp_readerrorlog stored procedure in SQL Server 2012

FIX: Filestream directory is not visible after an AlwaysOn replica is restarted in SQL Server 2012

FIX: Cannot alter column because it is enabled for Replication or Change Data Capture error occurs after a database is restored to a SQL Server that does not support change data capture

FIX: Error 1478 when you add a database back to the AlwaysOn availability group in SQL Server 2012

FIX: “Cannot resolve the collation conflict” error when you apply a snapshot to the subscriber database in SQL Server

FIX: “A severe error occurred on the current command” when a Table-Valued User-Defined function is referred to by a synonym

FIX: Creating a database on a system that has a large amount of memory installed takes longer

FIX: “Non-yielding Scheduler” error when versioning cleanup task runs on a SQL Server AlwaysOn secondary replica

FIX: FileTables in an AlwaysOn availability group become unavailable after failover in an instance of SQL Server 2014 or 2012

FIX: sys.dm_db_index_usage_stats missing information after index rebuild on SQL Server 2012

FIX: Memory corruption causes an access violation in an instance of SQL Server 2014 or 2012

 

SQL Server 2012 SP3 Cumulative Update 4 (Build 11.0.6540), 19 total public hot fixes

FIX: SQL Server crashes when you run a remote query in a stored procedure by using an invalid user name

FIX: Storage device overhead when you back up data or log files to a network share in SQL Server 2014 or 2012

FIX: Memory leak on the AlwaysOn secondary replica when change tracking is enabled in SQL Server

Transaction log backup failure on the secondary replica prevents subsequent backups on Availability Replicas in SQL Server 2012

FIX: SQL Server 2012 failover cluster diagnostic log does not accurately reflect the failure_condition_level setting

FIX: DBCC CHECKDB doesn’t report metadata inconsistency of invalid filegroups in its summary in SQL Server 2014 and SQL Server 2012

 

SQL Server 2012 SP3 Cumulative Update 5 (Build 11.0.6544), 20 total public hot fixes

FIX: Assertion failures occur when you query the database-state information in SQL Server 2012

CPU usage increases significantly when you execute queries that contain CHANGETABLE functions in SQL Server 2012 Service Pack 3

FIX: Queries that run against secondary databases always get recompiled in SQL Server

SQL Server crashes because of an access violation error that occurs while it reads data from an event file target

SQL Server 2014 or 2012 doesn’t start after you configure the tempdb database to use a very small log file

Unexpected growth of tempdb data files when using SQL Server Service Broker

“The log backup chain is broken” error when the log backup process fails in SQL Server

Operating system error 32 when you restore a database in SQL Server 2014 or 2016

 

SQL Server 2012 SP3 Cumulative Update 6 (Build 11.0.6567), 11 total public hot fixes

FIX: DBCC CHECKFILEGROUP reports false inconsistency error 5283 on a database that contains a partitioned table in SQL Server

Calculation using two measure time values in iterations returns negative values in SQL Server 2012, 2014, or 2016

FIX: TDE encrypted Databases go in suspect state during the recovery phase when you restart SQL Server 2012

FIX: Automatic failover doesn’t occur after database mirroring stops unexpectedly

FIX: Incorrect full-text keys are recorded for the rows that aren’t indexed correctly by a full-text index in SQL Server 2012

FIX: Rebuilding a nonclustered index to add new columns by using CREATE INDEX together with the DROP_EXISTING=ON and ONLINE=ON clauses causes blocking

FIX: Error 3456 “Could not redo log record” occurs, causing replicas to be suspended or repeated behavior in SQL Server

 

SQL Server 2012 SP3 Cumulative Update 7 (Build 11.0.6579), 11 total public hot fixes

FIX: An Always On secondary replica goes into a disconnecting state

FIX: The Target Recovery Time of a database set to a nonzero value causes an assertion and a lease timeout in SQL Server 2014

“A digitally signed driver is required” warning when you install SQL Server packages in Windows Server 2016 and Windows 10

FIX: On failover, the new secondary replica stops accepting transaction log records until the instance is restarted in SQL Server

FIX: Assert memory dump on a mirror server in SQL Server 2012

FIX: Changing the data type and then updating the table with more than 4,000 records causes database corruption

 

SQL Server 2012 SP3 Cumulative Update 8 (Build 11.0.6594), 17 total public hot fixes

FIX: DMV sys.dm_hadr_availability_group_states displays “NOT_HEALTHY” in synchronization_health_desc column on secondary replicas in SQL Server 2012

FIX: Failed assertion and many access violation dump files after the sp_replcmds stored procedure is canceled in SQL Server 2012

FIX: Bad query plan created on secondary replicas after statistics updated via FULLSCAN option on primary replica in SQL Server 2012

FIX: A memory leak in SQLWEP causes the host process Wmiprvse.exe to crash in SQL Server 2012

Update improves handling of documents too large for Full-Text Search indexing in SQL Server

Update reduces the execution frequency of the sp_MSsubscription_cleanup stored procedure in SQL Server 2012

FIX: Error 5262 when you execute DBCC CHECKDB on the primary replica in SQL Server 2012, 2014 or 2016

 

SQL Server 2012 SP3 Cumulative Update 9 (Build 11.0.6598), 10 total public hot fixes

FIX: “The custom resolver for this article requires OLEAUT32.DLL with a minimum version of 2.40.4276” error with merge publication in SQL Server

FIX: Can’t grant permissions to another user to log in to an availability group after the owner is removed in SQL Server 2012 or 2014

FIX: Access violation when a stored procedure is dropped before you execute END TRY section in SQL Server 2012 or 2016

FIX: A REDO thread is not available in the secondary replica after an availability database is dropped in SQL Server 2012

FIX: A stored procedure may fail after an automatic failover occurs on a mirrored database in SQL Server 2012

 

SQL Server 2012 SP3 Cumulative Update 10 (Build 11.0.6607), 5 total public hot fixes

FIX: Access violation occurs when you update compressed data in SQL Server 2012 or 2014

FIX: Timeout when you back up a large database to URL in SQL Server 2014

Update adds the “CLR strict security” feature to SQL Server 2016

FIX: Change Data Capture stops working after a recent cumulative update for SQL Server is installed

 

Once again, the idea here is to give you a lot of concrete reasons to want to stay current with the latest SQL Server 2012 SP and CU, by pointing out some of the more valuable fixes in each CU in the Service Pack 3 branch.  If my opinion does not sway everyone, this relatively new Microsoft KB article might be more convincing:

Announcing updates to the SQL Server Incremental Servicing Model (ISM)

Another very useful resource is this Microsoft KB article:

Recommended updates and configuration options for SQL Server 2012 and SQL Server 2014 used with high-performance workloads

Happily, Microsoft has been updating this KB article with new information, so you might want to read it again, if you have not done so already.

SQL Server Diagnostic Information Queries for May 2016

This month, I have a new query in the SQL Server 2014 and 2016 sets, along with additional comments and documentation in the SQL Server 2012, 2014 and 2016 sets. One thing I am considering is making a special version of these queries for SQL Database in Microsoft Azure. Does anybody want me to do that?

Rather than having a separate blog post for each version, I have just put the links for all six major versions in this single post. There are two separate links for each version. The first one on the top left is the actual diagnostic query script, and the one below on the right is the matching blank results spreadsheet, with labeled tabs that correspond to each query in the set. 

Here are links to the latest versions of these queries for SQL Server 2016, 2014 and 2012:

SQL Server 2016 Diagnostic Information Queries (May 2016)

SQL Server 2016 Blank Results

SQL Server 2014 Diagnostic Information Queries (May 2016)

SQL Server 2014 Blank Results

SQL Server 2012 Diagnostic Information Queries (May 2016)

SQL Server 2012 Blank Results

Here are links to the most recent versions of these scripts for SQL Server 2008 R2 and older:

Since SQL Server 2008 R2 and older are out of Mainstream support from Microsoft (and because fewer of my customers are using these old versions of SQL Server), I am not going to be updating the scripts for these older versions of SQL Server every single month going forward.  I started this policy a while ago, and so far, I have not heard any complaints. I did update these queries slightly in January 2016 though.

SQL Server 2008 R2 Diagnostic Information Queries (CY 2016)

SQL Server 2008 R2 Blank Results

SQL Server 2008 Diagnostic Information Queries (CY 2016)

SQL Server 2008 Blank Results

SQL Server 2005 Diagnostic Information Queries (CY 2016)

SQL Server 2005 Blank Results

The basic instructions for using these queries is that you should run each query in the set, one at a time (after reading the directions for that query). It is not really a good idea to simply run the entire batch in one shot, especially the first time you run these queries on a particular server, since some of these queries can take some time to run, depending on your workload and hardware. I also think it is very helpful to run each query, look at the results (and my comments on how to interpret the results) and think about the emerging picture of what is happening on your server as you go through the complete set. I have some comments in the script on how to interpret the results after each query.

You need to click on the top left square of the results grid in SQL Server Management Studio (SSMS) to select all of the results, and then right-click and select “Copy with Headers” to copy all of the results, including the column headers to the Windows clipboard. Then you paste the results into the matching tab in the blank results spreadsheet.

About half of the queries are instance specific and about half are database specific, so you will want to make sure you are connected to a database that you are concerned about instead of the master system database. Running the database-specific queries while being connected to the master database is a very common mistake that I see people making when they run these queries.

Note: These queries are stored on Dropbox. I occasionally get reports that the links to the queries and blank results spreadsheets do not work, which is most likely because Dropbox is blocked wherever people are trying to connect.

I also occasionally get reports that some of the queries simply don’t work. This usually turns out to be an issue where people have some of their user databases in 80 compatibility mode, which breaks many DMV queries, or that someone is running an incorrect version of the script for their version of SQL Server.

It is very important that you are running the correct version of the script that matches the major version of SQL Server that you are running. There is an initial query in each script that tries to confirm that you are using the correct version of the script for your version of SQL Server. If you are not using the correct version of these queries for your version of SQL Server, some of the queries are not going to work correctly.

If you want to understand how to better run and interpret these queries, you should consider listening to my three latest Pluralsight courses, which are SQL Server 2014 DMV Diagnostic Queries – Part 1SQL Server 2014 DMV Diagnostic Queries – Part 2 and SQL Server 2014 DMV Diagnostic Queries – Part 3. All three of these courses are pretty short and to the point, at 67, 77, and 68 minutes respectively. Listening to these three courses is really the best way to thank me for maintaining and improving these scripts…

Please let me know what you think of these queries, and whether you have any suggestions for improvements. Thanks!

SQL Server 2012 Service Pack 3 CU3 Available

Microsoft has released SQL Server 2012 Service Pack 3 CU3, which is Build 11.0.6537. There are 23 hotfixes in the public fix list, some of which look pretty significant. If you are running SQL Server 2012, you should be on the SP3 branch by now (or at least be planning on doing so soon).

Microsoft also released SQL Server 2012 Service Pack 2 CU12, which is Build 11.0.5649. There are 8 hotfixes in the public fix list.

As you may be aware, Microsoft has changed their official stance about proactively installing Cumulative Updates, as explained in this post:

Announcing updates to the SQL Server Incremental Servicing Model (ISM)

This means that you should make a greater effort to try to stay as current as possible on Cumulative Updates, despite the extra effort that requires.

If you are still on the SQL Server 2012 RTM or SP1 branches, you are on an “unsupported service pack”, which is not a good place to be, for a number of reasons.