Diagnose an AG failover timeout with listener DNS, MultiSubnetFailover, RegisterAllProvidersIP, HostRecordTTL, and client-driver checks.
Replacing a Running Total Cursor With a Window Function
That loop adding to a variable can usually become one window function. Here is the proof that the balances match, and the tie trap to watch for.
Reading a Backup File Before You Restore With RESTORE HEADERONLY
Use RESTORE HEADERONLY to identify backup sets, source versions and finish dates before selecting a restore and checking the media.
SQL SERVER – SQL Server Performance: Indexing Basics – SQL in Sixty Seconds #006 – Video
Indexes are the first baby step in tuning SQL Server performance. This SQL in Sixty Seconds video, #006, covers indexing basics in about a minute.
Intra-Query Parallel Deadlock: When One Query Blocks Itself
No error, no deadlock graph, just a report that is slow on some runs. Here is a demo where one query deadlocks with itself, and how to fix it.
A Separate Clustered Index for a Nonclustered GUID Primary Key
The primary key and the clustered index are two different jobs. This demo keeps the GUID as the public ID and clusters on an identity column instead.
What Is a View in SQL Server?
A view in SQL Server is a saved query, not a saved copy. Nothing is stored, the text is run every time, and that single fact explains what a view is good for and why it never makes anything faster.







