DAG Failover Toolkit: Scripted Distributed AG Failovers with Validation Gates
In a previous post, we looked at how Distributed Availability Groups work, why the failover syntax says FORCE_FAILOVER_ALLOW_DATA_LOSS, and what a scripted runbook should cover. This post introduces the toolkit that puts all of that…
Idempotent Data Patches in SQL Server: A Change Tracking Pattern for DACPAC Deployments
If you deploy your SQL Server databases with SSDT or DACPACs via SqlPackage, you have probably run into this problem: the schema deployment is repeatable, but the data patches are not. SSDT handles CREATE TABLE,…
Distributed Availability Groups: Architecture, Failover, and the Gotchas Nobody Mentions
A practical guide to SQL Server Distributed Availability Groups, covering architecture, failover mechanics, scripted runbooks, and the FileStream bug that TF 5597 fixes.
SQL Server hierarchyid: A Built-In Alternative to Recursive CTEs
Learn how SQL Server’s hierarchyid data type stores and queries tree structures without recursive CTEs, with practical examples for org charts and hierarchical data.
Recursive CTEs in SQL Server: How the Parts Actually Work Together
A plain-language walkthrough of recursive CTEs in SQL Server, breaking down the anchor, the recursive member, and the iteration cycle so the syntax finally makes sense.
A Better Cursor Pattern for SQL Server: Cursor Variables and @@CURSOR_ROWS
Replace the traditional WHILE @@FETCH_STATUS cursor loop with a cleaner pattern using cursor variables, STATIC cursors, and @@CURSOR_ROWS for more readable, less error-prone T-SQL.