T-SQL Tuesday #80 – SQL Birthday Present

It’s time for another round of the global blog party we call T-SQL Tuesday. This is T-SQL Tuesday #80 and happens to fall on the hosts birthday. First order of business is to wish our host, Chris Yates (blog|@YatesSQL), a very happy birthday! The next order of business is to hand out presents. As per Chris’s request, my present is for myself and for the community at large. For my contribution to this month’s T-SQL Tuesday, I am going to
read more

AG Worker Thread Blocked by Log Backup

We have an internal monitoring query that checks for system threads that are blocked. Recently, we received an alert email stating that system thread with session ID 44 had been blocked for at least 599 seconds (10 minutes, basically). This was in the middle of the night, and I looked into the issue once the work day began. Our 3rd party monitoring solution collects blocking information, but not for system threads. There was no additional information available for this blocking
read more

Corrupt Temporary Statistics in SQL Server 2014 Readable Replica

Earlier this week, the Database Strategy Team at my company was contacted about queries that were failing on one specific table. The same query on TableX and TableZ were successful, but it failed on TableY (not the real table names, but it is data partitioned into separate tables where the names are serialized in that fashion). They also reported that it did not fail when they ran the query directly in SQL Server Management Studio (SSMS). While I was just
read more

Troubleshooting Database Mirroring Error 1418 Updated

Troubleshooting Database Mirroring Error 1418 Updated Last night I was helping someone with a database mirroring setup problem via email. It has been a long time since I came across a new cause for the infamous 1418 error for database mirroring. This time the error was accompanied by an error in the SQL Log on the mirror partner that said teh following: Connection handshake failed. The certificate used by the peer is invalid due to the following reason: Certificate not
read more

Auditing Users in a Failover Partner Database

Auditing Users in a Failover Partner Database I read a question on a discussion list today asking if it is possible to audit SELECT queries on a log shipping secondary in stand-by mode. His attempts to set it up had obviously failed because the database is read-only and you cannot create a database audit in the database (nor anything else). Wanting to modify the secondary database is actually a pretty common question with a simple solution though I had never
read more

3 Log Shipping Techniques

3 Log Shipping Techniques My new article for SQL Server Magazine titled 3 Log Shipping Techniques has been posted online and will appear in an upcoming print issue. This article is a look at some very interesting techniques that use log shipping in interesting ways. Mastering these tehcniques can save you a great deal of time and frustration. You will learn how log shipping can be a very useful tool. I wrap it up with a tale of how I
read more

SQLU HA/DR Week – Database Mirroring Performance Counters

SQLU HA/DR Week – Database Mirroring Performance Counters Database mirroring debuted in SQL Server 2005 and had eleven performance counters for monitoring mirroring. There were ten new performance counters released with SQL Server 2008. We now have twenty-one performance counters to use for monitoring database mirroring. A list with a brief description of each can be found in Books Online or online at http://msdn.microsoft.com/en-us/library/ms189931.aspx. Many people find themselves without a clear understanding of what the counters mean and how to
read more

Does a Mirroring Failover Clear the Procedure Cache?

Does a Mirroring Failover Clear the Procedure Cache? I saw a question on the MSDN forums asking what happens to the procedure cache (also known as the plan cache) on the principal and mirror when a failover occurs. My reply was starting to get long, so I decided to move it out to a blog post. The original question poses the theory that the procedure cache is flushed on both mirror and principal when a failover occurs. How Mirroring Transfers
read more

Multi-subnet Failover Clusters

Multi-subnet Failover Clusters I want to take a closer look at one of the new features in SQL Server Denali. While everyone has been drooling over HADRON, another HA feature has gone mostly unnoticed. I haven’t heard anyone talking about it yet, so this should be an introduction to this new feature, Multi-subnet Failover Clusters. Geographically Dispersed Failover Clusters Multi-subnet failover clusters is an enhancement to an existing technology, geographically dispersed failover clusters. SQL Server 2008 and Windows Server 2008
read more

Database Mirroring FAQ: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup?

Question: Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? This question was sent to me via email. My reply follows. Can a 2008 SQL instance be used as the witness for a 2005 database mirroring setup? Databases to be mirrored are currently running on 2005 SQL instances but will be upgraded to 2008 SQL in the near future. I have not tried this, need mirroring setup and was hoping to get a
read more