Compatibility level in SQL Server is a per-database setting, and upgrading the server does not change it. Why a restored database keeps the old level, what the setting really controls, and how to raise it without breaking a report.
Sizing a New SQL Server
Sizing a new SQL Server starts with workload evidence, growth, and recovery goals to estimate CPU, memory, storage, and headroom.
SQL SERVER – List All the DMV and DMF on Server
“How many DMV and DVF are there in SQL Server 2008?” – this question was asked to me in one of the recent SQL Server Training.
SQL SERVER – Finding Expensive Cached Query Statements with DMVs
Finding the Most Expensive Queries starts with choosing a resource measure. I use cached statistics as an investigation aid.
XML nodes: Turn Repeated Elements Into Rows
XML nodes maps elements to rows. Extract values relative to each node, preserve duplicates, and review documents without matching children.
SQL SERVER – Understanding ALTER INDEX ALL REBUILD with Disabled Clustered Index
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?
SQL SERVER – Size of Index Table for Each Index – Solution 3 – Powershell Index Size
Laerte Junior fixed my Powershell setup remotely in minutes and sent solution 3 to my puzzle on the size of each index. Here is his Powershell Index Size answer.
SQL SERVER – Size of Index Table for Each Index – Solution 2
A second solution to my size of index table puzzle: Rama Mathanmohan’s query sums used pages from sys.allocation_units to give each index size in KB.
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.










