Backup retention should preserve restore chains while meeting recovery, legal, and storage needs across full, differential, and log backups.
SQL SERVER – sys.dm_xe_map_values – Reasons for Statement Recompilation
What are all the reasons a statement recompiles? I found the full list with the DMV sys.dm_xe_map_values, handy when you read a Profiler or Extended Events trace.
Adding IDENTITY to an Existing Column With ALTER TABLE SWITCH
Add IDENTITY to an existing column with an empty matching table, ALTER TABLE SWITCH, a reseed, and full dependency checks.
SQL SERVER – DELETE From SELECT Statement – Using JOIN in DELETE Statement – Multiple Tables in DELETE Statement
After my UPDATE from SELECT post, many readers asked about using JOIN in DELETE statement. It is possible, and I show how with multiple tables.
UNMASK on One Column: Granting Unmasking in SQL Server 2022
Support needs phone numbers but not salaries. Here is how to unmask one column, and what that permission does not do.
Adding a NOT NULL Column With a Default to a Big Table
Add a NOT NULL column with a default safely, distinguish metadata changes from row updates, and plan a staged Standard edition rollout.
SQL SERVER – UPDATE From SELECT Statement – Using JOIN in UPDATE Statement – Multiple Tables in Update Statement
A developer wrote a cursor because he did not know how to UPDATE from SELECT. I show how to use JOIN and multiple tables in an UPDATE statement.







