Microsoft SQL Server 2012 SP1 Cumulative Update 7

Microsoft has released SQL Server 2012 Service Pack 1 Cumulative Update 7, which is Build 11.0.3393.0. This CU has 47 fixes in the public hotfix list, a number of which seem to be quite significant for performance and stability.

Here are fourteen database engine-related fixes that are in SQL Server 2012 SP1 CU7:

FIX: Access violation when you trace an RPC event class by using SQL profiler or XEvents in SQL Server 2012

FIX: Nonclustered index corruption may occur when you run a complex UPDATE statement together with a NOLOCK hint against a table in SQL Server 2008, SQL Server 2008 R2 or SQL Server 2012

FIX: The threads are not scheduled evenly in SQL Server 2012 Standard Edition

A memory leak occurs when a SQL Server Native Client OLE DB provider application calls the Prepare method in SQL Server 2012

FIX: “Non-yielding Resource Monitor” when you run a workload that executes concurrent queries in SQL Server 2012

FIX: Function sys.fn_hadr_backup_is_preferred_replica costs almost all the CPU usage in Log Shipping in SQL Server 2012

FIX: Slow performance in SQL Server when you build an index on a spatial data type of a large table in a SQL Server 2012 instance

FIX: Slow performance in SQL Server 2012 when you build an index on a spatial data type of a large table

An access violation occurs when “sys.dm_db_index_physical_stats” is used in an IF EXISTS statement in an SQL query in SQL Server 2012

FIX: Suboptimal execution plan is generated when you run a query in SQL Server 2012

Slow SQL Server performance and a memory leak occurs after you apply Cumulative Update 3 for SQL Server 2012 Service Pack 1

FIX: Slow performance in SQL Server 2012 when you build an index on a spatial data type of a large table

Slow performance or error messages are logged when you have a transactional replication publisher server in SQL Server 2012

FIX: Insufficient system memory error occurs when you try to create an index in a char, varchar, or nvarchar type column in SQL Server 2012

This cumulative update is only for SQL Server 2012 Service Pack 1 (so you must be on Build 11.0.3000 or higher). If you are running SQL Server 2012, I really think you should be on the Service Pack 1 branch by now (or at least be planning to get there soon).

Posted in SQL Server 2012 | Tagged | Leave a comment

SQL Server Diagnostic Information Queries for November 2013

I have made a number updates and bug fixes, including some additional columns in some of the queries for all of the versions of my SQL Server Diagnostic Information Queries for this month.  I have also added more comments and links about how to interpret the results.

Rather than having a separate blog post for each version, I’ll just put the links for all five major versions here. There are two separate links for each version. The one on the left is the actual script, and the one on the right is the blank results spreadsheet.

SQL Server 2005 Diagnostic Information Queries SQL Server 2005 Blank Results

SQL Server 2008 Diagnostic Information Queries SQL Server 2008 Blank Results

SQL Server 2008 R2 Diagnostic Information Queries SQL Server 2008 R2 Blank Results

SQL Server 2012 Diagnostic Information Queries SQL Server 2012 Blank Results

SQL Server 2014 Diagnostic Information Queries SQL Server 2014 Blank Results

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.

The idea is that you would run each query in the set, one at a time (after reading the directions). You need to click on the top left square of the results grid 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 spreadsheet. There are also some comments on how to interpret the results after each query.

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 databases in 80 compatibility mode, which breaks many DMV queries.

There is an initial query in each version that tries to confirm that you are using the correct version of the script for your version of SQL Server.

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

Posted in Diagnostic Queries, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014 | Tagged , | 1 Comment

SQL Server Diagnostic Information Queries for October 2013

I have made some minor updates and bug fixes for all of my SQL Server Diagnostic Information Queries for this month. 

Rather than having a separate blog post for each version, I’ll just put the links for all five versions here.

SQL Server 2005 Diagnostic Information Queries        SQL Server 2005 Blank Results

SQL Server 2008 Diagnostic Information Queries        SQL Server 2008 Blank Results

SQL Server 2008 R2 Diagnostic Information Queries  SQL Server 2008 R2 Blank Results

SQL Server 2012 Diagnostic Information Queries        SQL Server 2012 Blank Results

SQL Server 2014 Diagnostic Information Queries        SQL Server 2014 Blank Results

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.

The idea is that you would run each query in the set, one at a time (after reading the directions). You need to click on the top left square of the results grid 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 spreadsheet. There are also some comments on how to interpret the results after each query.

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 databases in 80 compatibility mode, which breaks many DMV queries.

Please let me know what you think of these queries.

Posted in Diagnostic Queries, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014 | Tagged , | 15 Comments

SQL Server Diagnostic Information Queries for September 2013

I have gone through and made some minor updates and bug fixes for all of my SQL Server Diagnostic Information Queries for this month. I have also added a new version for SQL Server 2014.

Rather than having a separate blog post for each version, I’ll just put the links for all five versions here.

SQL Server 2005 Diagnostic Information Queries        SQL Server 2005 Blank Results

SQL Server 2008 Diagnostic Information Queries        SQL Server 2008 Blank Results

SQL Server 2008 R2 Diagnostic Information Queries  SQL Server 2008 R2 Blank Results

SQL Server 2012 Diagnostic Information Queries        SQL Server 2012 Blank Results

SQL Server 2014 Diagnostic Information Queries        SQL Server 2014 Blank Results

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.

The idea is that you would run each query in the set, one at a time (after reading the directions). You need to click on the top left square of the results grid 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 spreadsheet. There are also some comments on how to interpret the results after each query.

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 databases in 80 compatibility mode, which breaks many DMV queries.

Please let me know what you think of these queries.

Posted in Diagnostic Queries, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014 | Tagged , | 1 Comment

Selecting an Appropriate Intel Xeon E5-2600 v2 Family Processor for SQL Server 2012

Intel has finally released the 22nm Xeon E5-2600 v2 Family (Ivy Bridge-EP) of processors that will be used in two-socket servers. These processors have slightly better single-threaded performance than the previous 32nm Xeon E5-2600 Family (Sandy Bridge-EP) processors, along with higher physical core counts and lower power usage.

They are pin-compatible with the older Sandy Bridge-EP processors, so they will work in existing two-socket servers, such as the Dell PowerEdge R720 or the HP Proliant DL380p Gen 8. This means that you should be able to get an Ivy Bridge-EP in an existing server model fairly quickly.

Once this happens, the question will be which exact E5-2600 v2 processor you should pick for SQL Server 2012 or SQL Server 2014 usage? Since SQL Server 2012 uses core-based licensing, you really want to get the most performance possible from each physical core that you buy a SQL Server core license for.

There are several different choices available, based on your budget, performance and scalability requirements, ranging from four physical cores without hyper-threading to twelve physical cores with hyper-threading.

Remember, only physical cores count for licensing purposes (on non-virtualized servers). If there are two or more models with the same physical core count, you should prefer the one with the highest clock speed (since the license cost is the same).  You also want to avoid the low-power models (that have the L suffix at the end of the model number). They save a relatively small amount of electrical power at the cost of a pretty significant performance penalty.

This leaves five viable choices, depending on your desired physical core count, as shown in Table 1.

Model Cores Base Speed Turbo Speed
E5-2697 v2 12 2.7 GHz 3.5 GHz
E5-2690 v2 10 3.0 GHz 3.6 GHz
E5-2667 v2 8 3.3 GHz 4.0 GHz
E5-2643 v2 6 3.5 GHz 3.8 GHz
E5-2637 v2 4 3.5 GHz 3.8 GHz

Table 1: Recommended Xeon E5-2600 v2 Processor Models for SQL Server 2012/2014

In my opinion, there is no good technical reason to select any of the other available models from this product family for SQL Server 2012/2014 usage.

I think it is interesting that the new eight-core E5-2667 v2 has higher clock speeds and slightly better single-threaded performance than the previous generation, eight-core E5-2690 processor. The new four-core E5-2637 v2 also has higher clock speeds and slightly better single-threaded performance than the previous generation, four-core E5-2643 processor. Getting better performance for the same SQL Server 2012 license cost is always a good thing!

Posted in Computer Hardware, Intel, Ivy Bridge-EP, SQL Server 2012 | Tagged | 3 Comments

TPC-E Benchmark Results for Intel Xeon E5-2697 v2

Two new TPC-E benchmark results have shown up for two-socket database servers using the brand new, 22nm Intel Xeon E5-2697 v2 (Ivy Bridge-EP) processor. The first result is for an IBM System x3650 M4 with 512GB of RAM, that has a score of 2590.93. The second result is for a Fujitsu Primergy RX300 S8 with 512GB of RAM, that has a score of 2472.58.

These two systems are shown in Table 1, along with the best result for an earlier, two-socket, HP ProLiant DL380p Gen 8 system with 256GB of RAM, with a score of 1881.76, using the earlier eight-core, 32nm Intel Xeon E5-2690 (Sandy Bridge-EP) processor.

Vendor Processor TPC-E Score Score/Core
IBM E5-2697 v2 2590.93 107.96
Fujitsu E5-2697 v2 2472.58 103.03
HP E5-2690 1881.76 117.61

Table 1: Comparing Three Different TPC-E Results

These results show pretty linear scalability as we move from an eight-core processor, to the newest twelve-core processor (that is actually running at a slightly lower clock speed). This gives me more confidence about running even bigger workloads on a new two-socket system, and getting better performance and much lower SQL Server 2012 license costs than you can get from any current, four-socket database server.

The Xeon E5-2697 v2 processor has twelve physical cores, plus hyper-threading, for a total of 24 logical cores per processor. It runs at a base clock speed of 2.7GHz, with the ability to Turbo Boost up to 3.5GHz.

This processor is the new “top-of-the-line” Xeon E5-2600 v2 series processor. If you want to minimize your SQL Server 2012 licensing costs, you can still pick a Xeon E5-2600 v2 series processor with a lower physical core count, such as a six-core Xeon E5-2643 v2.

Keep in mind that you can only use 16 physical cores with an instance of SQL Server 2012 Standard Edition, so a new, two socket server with these 12-core processors will go over that limit.

Posted in SQL Server 2012, TPC-E | Tagged | Leave a comment

Fixing a Bug: DBCC CHECKDB data purity checks are skipped for master and model

Fellow MVP Paul Randal just blogged about an issue he has discovered with how the master and model databases are created in SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, and SQL Server 2012. I just checked, and the same issue is present in SQL Server 2014 CTP1 (Build 11.0.9120).

Here is a more heavily commented version of Paul’s code to detect and fix the issue (that is also easier to copy and paste).  Please read Paul’s post for more details and background.

-- Fixing a Bug: DBCC CHECKDB data purity checks are skipped for master and model
-- By: Paul Randal
-- Posted on: August 29, 2013 1:15 pm 
-- http://www.sqlskills.com/blogs/paul/bug-dbcc-checkdb-data-purity-checks-are-skipped-for-master-and-model/

-- Turn on a session-level trace flag
DBCC TRACEON (3604); 

-- Look for the value of dbi_dbccFlags = 0. We want it to be dbi_dbccFlags = 2
DBCC DBINFO (N'master'); 
GO 
DBCC DBINFO (N'model'); 
GO 


-- This will set the value for dbi_dbccFlags correctly as part of running DBCC CHECKDB
DBCC CHECKDB (N'master') WITH DATA_PURITY, NO_INFOMSGS; 
GO
DBCC CHECKDB (N'model') WITH DATA_PURITY, NO_INFOMSGS; 
GO

-- Look for the value of dbi_dbccFlags = 2
DBCC DBINFO (N'master'); 
GO 
DBCC DBINFO (N'model'); 
GO 

-- Turn off the trace flag (even though it is just a session trace flag)
DBCC TRACEOFF (3604); 

Posted in SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Tagged | 1 Comment

SQL Server 2012 RTM CU9

On August 20, Microsoft released SQL Server 2012 RTM Cumulative Update 9, which is Build 11.0.2419. I count seven fixes in the public fix list. This a very low number of hotfixes compared to all previous SQL Server 2012 Cumulative Updates, which is probably a good sign about the SQL Server 2012 code base settling down.

This CU is only for the RTM branch of SQL Server 2012, so you don’t want to install it if you are on the Service Pack 1 branch (with a build number greater than or equal to 11.0.3000).

Since the RTM and SP1 branches for SQL Server 2012 are not synchronized, the equivalent fixes won’t show up for SQL Server 2012 SP1 until mid-September.

Posted in Cumulative Update, SQL Server 2012 | Tagged | 1 Comment

SQL Server Diagnostic Information Queries for August 2013

I have gone through and made some minor updates and bug fixes for all of my SQL Server Diagnostic Information Queries for this month. I also added two new queries at the end of the script, to collect some information about the SQL Server Agent jobs and about the SQL Server Agent alerts (which are different than notifications about jobs) on the SQL Server instance.

Rather than having a separate blog post for each version, I’ll just put the links for all four versions here.

SQL Server 2005 Diagnostic Information Queries SQL Server 2005 Blank Results

SQL Server 2008 Diagnostic Information Queries SQL Server 2008 Blank Results

SQL Server 2008 R2 Diagnostic Information Queries SQL Server 2008 R2 Blank Results

SQL Server 2012 Diagnostic Information Queries SQL Server 2012 Blank Results

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.

The idea is that you would run each query in the set, one at a time (after reading the directions). You need to click on the top left square of the results grid 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 spreadsheet.

There are also some comments on how to interpret the results after each query. Please let me know what you think of these queries.

Posted in Diagnostic Queries, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Tagged , | 15 Comments

Speaking at PASS Summit

I found out last week that I will be presenting three sessions at the PASS Summit 2013 in Charlotte, NC. The first one will be a full-day pre-conference session on Scaling SQL Server 2012. This will be an updated and reorganized version of the preconference session that I have given this year in Lisbon Portugal, Omaha, and in Orange County.

The second presentation will be a regular, 75-minute session about the basics of storage for the DBA.  The third presentation (which was added since another speaker had to cancel) will be another regular 75-minute session about how to use DMV queries to diagnose performance issues. If history is any guide, I will probably have more people attending my DMV session than the hardware session.

I think all three of these sessions will be a lot of fun!  Here are the abstracts for all three sessions:

Scaling SQL Server 2012

SQL Server implementations can rapidly evolve and become more complex, forcing DBAs and developers to think about how they can scale their solution quickly and effectively. Scaling up is relatively easy but can be expensive, while scaling out requires significant engineering time and effort. If you suggest hardware upgrades, you may be accused of simply “throwing hardware at the problem.” And if you try to scale out, you may be thwarted by a lack of development resources or third-party software restrictions. As your database server nears its load capacity, what can you do? This comprehensive full-day session will give you concrete, practical advice about how to scale SQL Server. Starting with your current workload, configuration, and hardware, we’ll explore how to find and alleviate bottlenecks, whether they are workload related, configuration related, or hardware related. Next, we’ll cover how you can decide whether you should scale up or scale out your data tier. For scale-up solutions, you’ll learn how to scale up properly with nearly zero down time. And for scale-out implementations, you’ll learn about practical, production-ready techniques such as vertical partitioning, horizontal partitioning, and data-dependent routing. We’ll also cover how to use middle-tier caching and other application techniques to increase your overall scalability.

Storage Subsystem Basics for the DBA

Do you feel lost when talking to your storage administrator? Are your storage subsystems like a mysterious black box where your databases live but you can’t go visit? This session will get you up to speed with the fundamentals of storage subsystems for SQL Server. You’ll learn about the different types of storage available and how to decide which to use for different workload types. You’ll also learn useful tips and techniques for configuring your storage for the best performance and reliability. We’ll then cover methods to effectively measure and monitor your storage performance so that you’ll have valuable information and evidence available the next time you have to discuss I/O performance with your storage administrator.

Professor DMV: How to Use DMVs to Diagnose Performance Issues

Dynamic Management Views (DMVs) and functions let you easily see exactly what is happening inside your SQL Server instances and databases with a high level of detail. You can discover your top wait types and most CPU-intensive stored procedures, find missing indexes, and identify unused indexes – to name just a few examples. This session will present, explain, and demonstrate many DMV queries that you can quickly and easily use to detect and diagnose configuration and performance issues in your SQL Server instances and databases.

Summit2013 Speaking at PASS Summit 2013 in Charlotte

There will be a large presence at PASS Summit 2013 from SQLskills, with sessions from Paul Randal, Kimberly Tripp, Jonathan Kehayias, Glenn Berry, and Erin Stellato. The PASS Summit is always a good time, since it is an event where you can make a lot of valuable connections and friendships and learn a great deal of technical content during the week.

Posted in PASS, Teaching | Tagged , | 1 Comment