A vendor says to turn on optimizer hotfixes. Here is how I check the setting, try it on one statement, and restore it.
Finding Orphaned Data and Log Files Nobody Attached
Inventory orphaned data and log files by comparing data-folder contents with sys.master_files, then review candidates before cleanup.
Safe Dynamic SQL With sp_executesql and QUOTENAME
Write safe dynamic SQL with typed value parameters, validated object names, and allowed sort columns, then test hostile input.
Optimized Locking in SQL Server 2025: What Changes for Blocking
Enable optimized locking in SQL Server 2025 with ADR and RCSI, then compare lock counts and blocking while checking LAQ limits.
Formatting T-SQL Consistently Across a Team
Formatting T-SQL consistently means choosing a few readable rules, using a formatter carefully, and keeping historical changes focused.
Waiting for an Agent Job to Finish Before the Next Step Runs
Wait for an Agent job to finish by polling its current sysjobactivity row, enforcing a timeout, and checking sysjobhistory outcome.







