What does ALTER INDEX ALL REBUILD do when the clustered index is disabled, compared to rebuilding just that index? A step by step demo shows it.
SQL SERVER – Spatial Database Queries – What About BLOB
Spatial database queries are my favorite subject since TechEd India 2010. Here are the scripts to build the environment, plus a question: what about BLOB?
Finding the First Monday of Every Month in T-SQL
Calculate the first Monday without DATEFIRST, list a full year, find nth and last weekdays, and reuse the rules in an inline table function.
Where Reference Data Should Live
Reference data belongs in governed lookup tables with stable codes, clear owners, and a release process that keeps environments aligned.
Estimating Cloud Database Cost From Your Workload
Cloud database cost depends on measured compute, storage, backup retention, and network egress; build a workload-based estimate before migrating.
SQL SERVER – Get Latest SQL Query for Sessions – DMV
Want the latest SQL query for sessions on your server? Join sys.dm_exec_connections with sys.dm_exec_sql_text using most_recent_sql_handle.
SQL SERVER – SHRINKFILE and TRUNCATE Log File in SQL Server 2008
A reader’s job failed after upgrading to SQL Server 2008 because TRUNCATE_ONLY is gone. My notes on SHRINKFILE and TRUNCATE Log File, and what to watch for.






