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.
Contained Databases and Contained Users
Understand contained users in SQL Server databases, how they travel with a database, and the security trade-offs of partial containment.
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.
Using sp_help and Friends to Explore a Database
Using sp_help, sp_helpindex, sp_helptext, and sp_spaceused gives a quick SQL Server tour before you reach for catalog views.







