Trace flags let a DBA turn a database function on or off for a while. How to use DBCC TRACEON and TRACEOFF, with deadlock trace flag 1205 as the example.
Change Database Compatibility Level in SQL Server Safely
How to change database compatibility level in SQL Server 2025 with ALTER DATABASE. It covers the levels the server accepts, what the level changes in the optimizer, why single user mode isn’t needed, and a safe routine for raising the level with Query Store.
CTE Column Names: Rename Positions Without Moving Values
CTE column names rename positions without moving values. Compare inner aliases, report names and a misleading reversed list.
SQL SERVER – 2005 Limiting Result Sets by Using TABLESAMPLE – Examples
TABLESAMPLE returns a random sample of rows by percent or row count. My examples show why the same query returns a different number of rows each time.
SQL SERVER – 2005 Find Table without Clustered Index – Find Table with no Primary Key
A query on sys.indexes to find every table without clustered index in a database, why heaps can slow you down, and how to pick a clustered key.
SQL SERVER – Change Default Fill Factor For Index
The Default Fill Factor in SQL Server is 0. Change it with sp_configure to leave free space on index pages and reduce page splits. I like mine at 90.







