SQL Server 2014 Service Pack 1 CU7

On June 20, 2016, Microsoft released SQL Server 2014 Service Pack 1 CU7, which is Build 12.0.4459. This cumulative update has 35 fixes in the public hot fix list. Quite a few of these fixes seem to be pretty significant.

They also released SQL Server 2014 RTM CU14, which is Build 12.0.2569. This cumulative update has 21 fixes in public hot fix list. This is the last CU for the RTM branch.

SQL Server 2014 Service Pack 2 is due to be released in July of 2016, so depending on how old of a build of SQL Server 2014 you are on, you might just want to wait for SP2. Otherwise, I think you should try to stay on a current CU, in a proactive fashion. Microsoft recently changed their official guidance about installing CUs, as you can read about here.

More Intel Broadwell Server Processor Families Available

Back on March 31, 2016 (the last day of Q1 2016), Intel released the 14nm Xeon E5-2600 v4 Product Family (Broadwell-EP), which is currently the highest single-threaded performance product family for two-socket servers. You can read about some of the specific enhancements in this family in this document: Intel® Xeon® Processor E5-2600 V4 Product Family Technical Overview. These processors are socket compatible with the previous Haswell-EP family, so they work with (and are currently available for) existing server models from all of the major server vendors.

If you are going to purchase a new Xeon E5-2600 v4 system (which I think is the best choice for most people), then the model numbers shown in Table 1 are your best choices for SQL Server usage, for each physical core count. The eight-core Xeon E5-2667 v4, the six-core Xeon E5-2643 v4 and the four-core Xeon E5-2637 v4 are the “frequency-optimized” models that would be my preferred choices in most situations for SQL Server usage.

 

Model Cores/L3 Cache Base Clock Turbo Clock Price
Xeon E5-2699 v4 22/55MB 2.20 GHz 3.60 GHz $4,115.00
Xeon E5-2698 v4 20/50MB 2.20 GHz 3.60 GHz $3,226.00
Xeon E5-2697 v4 18/45MB 2.30 GHz 3.60 GHz $2,702.00
Xeon E5-2697A v4 16/40MB 2.60 GHz 3.60 GHz $2,891.00
Xeon E7-2690 v4 14/35MB 2.60 GHz 3.50 GHz $2,090.00
Xeon E7-2687W v4 12/30MB 3.00 GHz 3.50 GHz $2,141.00
Xeon E7-2640 v4 10/25MB 2.40 GHz 3.40 GHz $939.00
Xeon E7-2667 v4 8/25MB 3.20 GHz 3.60 GHz $2,057.00
Xeon E7-2643 v4 6/20MB 3.40 GHz 3.70 GHz $1,552.00
Xeon E7-2637 v4 4/15MB 3.50 GHz 3.70 GHz $996.00

Table 1: Preferred Xeon E5-2600 v4 Family Processors (Broadwell-EP)

 

On June 6, 2016, Intel released the 14nm Xeon E7 v4 Product Family (Broadwell-EX), for four-socket and larger servers. These processors are also socket compatible with the previous Haswell-EX family, so they work with (and are currently available for) existing server models from all of the major server vendors. I have to admit that this quick release of the Xeon E7 v4 took me by surprise, since I was not expecting it until late 2016 or early 2017, based on Intel’s past release history. Typically, there is anywhere from a six to eighteen month delay between the release of a new generation Xeon E5-2600 processor family, and an equivalent generation Xeon E7 processor family.

If you are going to purchase a new Xeon E7 v4 system, then the model numbers shown in Table 2 are your best choices for SQL Server usage, for each physical core count. The eighteen-core Xeon E7-8867 v4, the ten-core Xeon E7-8891 v4 and the four-core Xeon E7-8893 v4 are the “frequency-optimized” models that would be my preferred choices in most situations for SQL Server usage.

 

Model Cores/L3 Cache Base Clock Turbo Clock Price
Xeon E7-8890 v4 24/60MB 2.20 GHz 3.40 GHz $7,174.00
Xeon E7-8880 v4 22/55MB 2.20 GHz 3.30 GHz $5,895.00
Xeon E7-8870 v4 20/50MB 2.10 GHz 3.00 GHz $4,672.00
Xeon E7-8867 v4 18/45MB 2.40 GHz 3.30 GHz $4,672.00
Xeon E7-4850 v4 16/40MB 2.10 GHz 2.80 GHz $3,003.00
Xeon E7-4830 v4 14/35MB 2.00 GHz 2.80 GHz $2,170.00
Xeon E7-8891 v4 10/60MB 2.80 GHz 3.50 GHz $6,841.00
Xeon E7-4809 v4 8/20MB 2.10 GHz 2.10 GHz $1,223.00
Xeon E7-8893 v4 4/60MB 3.20 GHz 3.50 GHz $6,841.00

Table 2: Preferred Xeon E7 v4 Family Processors (Broadwell-EX)

 

On June 20, 2016, Intel released the 14nm Xeon E5-4600 v4 Product Family (Broadwell-EP), for four-socket servers, which was also somewhat of a surprise. To be honest, I am not a big fan of the E5-4600 v4 Family. The Xeon E5 is really meant for two-socket systems, and it does not seem to scale very well in a four-socket system. If you really need the higher total core counts and higher total memory limit that you would get from a Xeon E5-4600 v4 vs. a Xeon E5-2600 v4 system, I think you are better off to make the jump to a Xeon E7 v4 system (which will also get you more RAS features).

All of the Xeon E5-4600 v4 Family processors have relatively low base clock speeds, and the higher core count SKUs are actually quite expensive, basically in the same range as similar core count Xeon E7 v4 processors. If you really want a Xeon E5-4600 v4 system, then the model numbers shown in Table 3 are your best choices for SQL Server usage, for each physical core count. The ten-core Xeon E5-4627 v4 and eight-core Xeon E5-4655 v4 would be my preferred choices in most situations, since they are somewhat “frequency-optimized”, and have lower overall core counts, which will dramatically reduce your SQL Server 2016 licensing costs.

 

Model Cores/L3 Cache Base Clock Turbo Clock Price
Xeon E5-4669 v4 22/55MB 2.20 GHz 3.00 GHz $7,007.00
Xeon E5-4667 v4 18/45MB 2.20 GHz 3.00 GHz $5,729.00
Xeon E5-4660 v4 16/40MB 2.20 GHz 3.00 GHz $4,727.00
Xeon E5-4650 v4 14/35MB 2.20 GHz 2.80 GHz $3,838.00
Xeon E5-4640 v4 12/30MB 2.10 GHz 2.60 GHz $2,837.00
Xeon E5-4627 v4 10/25MB 2.60 GHz 3.20 GHz $2,225.00
Xeon E5-4655 v4 8/30MB 2.50 GHz 3.20 GHz $4,616.00

Table 3: Preferred Xeon E5-4600 v4 Family Processors (Broadwell-EP)

In many situations, you would be much better off to get two, very fast Xeon E5-2600 v4 based two-socket database servers rather than one Xeon E7 v4 based four-socket database server, assuming you can split your workload across two database servers.

AES-NI Encryption Support in SQL Server 2016

Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these posts, SQL 2016 – It Just Runs Faster – AlwaysOn AES-NI Encryption describes how SQL Server 2016 improved and simplified Endpoint creation for AlwaysOn AGs to default to AES, and to better leverage hardware support for AES-NI (when you are also running on Windows Server 2012 R2 or newer).

Intel describes AES-NI this way:

Intel AES New Instructions (Intel AES-NI) are a set of instructions that enable fast and secure data encryption and decryption. AES-NI are valuable for a wide range of cryptographic applications, for example: applications that perform bulk encryption/decryption, authentication, random number generation, and authenticated encryption.

Intel provides more complete documentation of AES here:

Intel Advanced Encryption Standard (Intel AES) Instructions Set

Now that we have a better idea of what AES-NI is, we need to know which server processors have AES-NI support. AES-NI was introduced with the 32nm Westmere microarchitecture. In the server space, this means the Intel Xeon 5600 product family (Westmere-EP) for two-socket servers and the Intel Xeon E7-4800/8800 product family (Westmere-EX) for four and eight-socket servers. Any newer Intel product family will also have AES-NI support.

These product families were released in Q1 2010 and Q2 2011 respectively, so they are both pretty old by modern standards. If you are planning to upgrade to SQL Server 2016, I would hope that you would use a new server with newer processors (ideally the latest 14nm Broadwell-EP or Broadwell-EX).

You can also use CPU-Z to confirm whether a particular processor has AES-NI support. Just to confuse things, CPU-Z displays AES-NI support as “AES”, which is the name of the broader standard. Figure 1 shows AES as one of the supported instructions for an Intel Xeon X5660 processor.

 

image

Figure 1: CPU-Z CPU Details for Intel Xeon X5650

 

Hardware Extension Support in SQL Server 2016

Microsoft’s Bob Dorr has recently consolidated a series of CSS posts about many low-level performance improvements in SQL Server 2016. One of these, How It Works: SQL Server 2016 SSE/AVX Support talks about how SQL Server 2016 added the use of SSE and AVX instructions in various code paths to improve performance when your processor supports one of those instruction sets.

Unless you are a hardware enthusiast, you might be wondering what these instructions are and how you can determine whether your processor supports them or not. First, we have some basic definitions:

Advanced Vector Extensions (AVX) were introduced in the server space with the Sandy Bridge-EP architecture, which was released in Q1 2012. This was the Intel Xeon E5-2600 Product Family. This means that if you have a server with Intel Xeon E5-2600 (Sandy Bridge-EP), Intel Xeon E5-2600 v2 (Ivy Bridge-EP), Intel Xeon E5-2600 v3 (Haswell-EP), or Intel Xeon E5-2600 v4 (Broadwell-EP) processors, you will have AVX support which SQL Server 2016 will use for better performance.

You will also have AVX support with the Intel Xeon E7-4800/8800 v2 (Ivy Bridge-EX), Intel Xeon E7-4800/8800 v3 (Haswell_EX), and Intel Xeon E7-4800/8800 v4 (Broadwell-EX) product families. Anything older than these families will not have AVX support.

This is yet another reason to use a new server when you upgrade to SQL Server 2016 (which is a good idea anyway for lots of other reasons).

Advanced Vector Extensions 2 (AVX2), is a newer version of AVX that was introduced with the Haswell-EP/EX architecture. If you have a Haswell-EP/EX or Broadwell-EP/EX processor, then you will have AVX2 support.

Streaming SIMD Extensions (SSE) are a much older instruction set that were introduced back in 1999. Since then, there have been several newer versions such as SSE2, SSE3, SSE4.1, and SSE4.2. The latest SSE4.2 version was introduced in the Nehalem-EP/EX architecture, which came out in Q1 2009 and Q1 2010 respectively. This means that the Intel Xeon 5500 (Nehalem-EP) and Intel Xeon 7500 (Nehalem-EX) Product families are the oldest models that will have SSE4.2 support. From Bob’s post, it appears that the same code path in SQL Server 2016 will be used if you have any version of SSE (but you don’t have AVX or AVX2 support), so even much older Xeon processors will have some level of SSE support. Just to be clear, AVX and AVX2 are newer and better than any version of SSE.

The CPU-Z utility shows the various extension instructions supported by your processor. As you can see in Figure 1, the Intel Xeon E5-2690 supports the AVX instruction set.

image

Figure 1: Intel Xeon E5-2690 CPU Details

A current model Intel Core i7-6700K Skylake desktop processor supports the newer FMA, and Transactional Synchronization Extensions (TSX) instructions, as shown in Figure 2. These were both introduced with the Haswell microarchitecture, and they might be useful in a future version of SQL Server, if Microsoft decides to use them.

image

 Figure 2: Intel Core i7-6700K CPU Details

SQL Server Diagnostic Information Queries for June 2016

This month, I have several improvements in the SQL Server 2014 and 2016 sets, along with additional comments and documentation in the SQL Server 2012, 2014 and 2016 sets. One new feature is a series of six dashes after each query to make them easier to parse by people who use PowerShell to run the queries and collect the results. I have gotten quite a bit of interest about making a special version of these queries for SQL Database in Microsoft Azure. So, I will be doing that pretty soon.

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 (June 2016)

SQL Server 2016 Blank Results

SQL Server 2014 Diagnostic Information Queries (June 2016)

SQL Server 2014 Blank Results

SQL Server 2012 Diagnostic Information Queries (June 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.

After running 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!

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

As of May 16, 2016, there have been three 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. Right now, that means Service Pack 3, CU3 (Build 11.0.5649), which was released on May 16, 2016. 

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

Build Description Release Date
11.0.6290 SP3 RTM November 22, 2015
11.0.6518 SP3 CU1 January 18, 2016
11.0.6523 SP3 CU2 March 21, 2016
11.0.6537 SP3 CU3 May 16, 2016

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

 

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.

SQL Server Diagnostic Information Queries for April 2016

This month, I have some additional columns in several queries in the SQL Server 2016 set, along with additional comments and documentation in the SQL Server 2012, 2014 and 2016 sets.

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 (April 2016)

SQL Server 2016 Blank Results

SQL Server 2014 Diagnostic Information Queries (April 2016)

SQL Server 2014 Blank Results

SQL Server 2012 Diagnostic Information Queries (April 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!

Hewlett Packard Enterprise Persistent Memory

Hewlett Packard Enterprise (HPE) has announced a new product that uses non-volatile DIMMs (NVDIMMs), which they are calling Persistent Memory. This short video gives a high level view of how it works, via a whiteboard time lapse. The initial product is an 8GB module which has 8GB of DRAM backed by 8GB of flash for $899.00, which is pretty pricey!

 

Figure 1: HPE 8GB NVDIMM

HPE has a blog post with some more details about their SQL Server testing using NVDIMMs.

They compared the OLTP database performance of a SQL Server database running on an HP DL360 Gen9 server in two scenarios. The details they provide are frustratingly incomplete. They don’t specify what version of SQL Server, what operating system, what type of SSDs, etc.

First Scenario:

  • Data file(s) on six 400GB SSDs
  • Log file on two mirrored SSDs (so two SSDs in RAID 1)
  • 970K transactions/minute
  • 373 µs log write latency

Second Scenario:

  • Data file(s) on six 400GB SSDs
  • Log file on two mirrored SSDs, with two mirrored NVDIMMs as a write-back cache in front of the SSDs
  • 1.08M transactions/minute
  • 181 µs log write latency

 

DB OLTP.jpg

Figure 2: HPE SQL Server Testing with NVDIMMs

 

These results are actually not as impressive as I would expect on the surface, so I would be very curious to more details behind their testing. For example, was their workload previously limited by how fast it could write to the transaction log? After they started using NVDIMMs, did they run into a different bottleneck, such as CPU utilization?

I also want to know more details how this is implemented, with existing server models and existing operating systems. It looks like there is a driver that excludes the DIMM slots that are being used by NVDIMMs from being visible to the operating system as conventional memory, and instead makes them available as a write-back cache layer for an existing storage device. It looks like you can combine multiple NVDIMMs into a single, mirrored cache layer in front of a single storage device. This seems pretty similar in concept to the hardware memory cache in a RAID controller.

This might be pretty useful if you have a workload that is actually seeing bottlenecks writing to a transaction log (or perhaps you have multiple databases with log files on the same logical drive), and you don’t want to use the Delayed Durability feature in SQL Server 2014 and newer or the In-memory OLTP features in SQL Server 2014 Enterprise Edition and newer.