Log backup on secondary replica fails with error 35296 when the replica sits in the secondary availability group of a distributed availability group. A client hit it on the fourth node of their topology. It is by design, so the backup has to run on a replica that talks to the global primary.
Filtered Statistics: Fixing Estimates for Skewed Data
Use filtered statistics to describe skewed customer values, inspect histograms, and test estimates under literal and parameterized queries.
Fewest Logical Reads: The Answer to the Delete Qualified Rows Puzzle
The fewest logical reads for the multiple table delete puzzle come from reading each table as few times as the rules allow. A string of student IDs gets to 4 reads. A set based delete needs 5 and is the one to use. The starting script needed 19.
How to Remove Quotes of QUOTENAME? – Interview Question of the Week #235
Question: How to Remove Quotes of QUOTENAME? I received based on my yesterday’s blog post SQL SERVER – QUOTENAME Function and Custom Quote Character.
QUOTENAME Function: Custom Quote Characters and Dynamic SQL
The QUOTENAME function turns a name into a safe identifier and doubles any closing delimiter inside it. Tested queries show which quote characters work, the 128 character limit and a dynamic SQL example. A short card lists the rules.
Rows Read Per Thread: Four Ways to See Them in SQL Server
Rows read per thread show whether a parallel query shares its work evenly. The post shows two plan based methods, a T-SQL query over the last actual plan, and a live DMV for running queries. A 500,000 row demo proves the threads add up to the table.
SQL SERVER – Query Specific Wait Statistics and Performance Tuning
Query Specific Wait Statistics helped explain a sudden customer-query slowdown. The remaining workload ran normally, and recompilation had not helped.
Unique Index Performance: What a UNIQUE Index Saves
Unique index performance gains come from what the optimizer learns, not from smaller pages. A tested demo compares pages, reads, plans and CPU for a plain index and a unique index. It also shows the error a duplicate causes.
Running SQL Server Under a Group Managed Service Account
Set up a group managed service account for SQL Server Engine and Agent, then verify permissions, SPNs, and Kerberos connections.










