The quickest way to kill all processes and user sessions in a database: SET SINGLE_USER WITH ROLLBACK IMMEDIATE, then back to MULTI_USER. No cursor needed.
SQL SERVER – Observation – Effect of Clustered Index over Nonclustered Index
An observation from my query optimization work: the effect of clustered index on a nonclustered index, shown with a sample table and execution plans.
TRY_PARSE: Make the Culture Explicit for Numeric Text
TRY_PARSE needs an explicit culture when punctuation has a specific numeric meaning. I keep that culture beside the source text. A successful conversion alone cannot establish that the intended number was read.
SQL SERVER – T-SQL Script for FizzBuzz Logic
FizzBuzz is a common interview puzzle: print 1 to 100, with Fizz for multiples of three and Buzz for five. Here is my T-SQL answer using a WHILE loop.
SQL SERVER – 2008 – 2005 – Rebuild Every Index of All Tables of Database – Rebuild Index with FillFactor
A quick script to rebuild every index of all tables in a database with a fillfactor of 80, plus a short note on what fillfactor does to leaf-level pages.
Estimating Table Growth for Next Year From Backup History
Estimate table growth with monthly full backup history, a twelve month forecast, and table space checks that separate evidence from guesses.







