After a stress test, long queries kept running on a client’s dev server. Here is the script I use to kill all the processes for one particular database.
How to Kill Processes Idle for X Hours? – Interview Question of the Week #152
Interview question: how to kill processes idle for X hours in SQL Server? Here is a script that finds idle sessions and kills them.
SQL SERVER – What is the query used in sp_cursorfetch and FETCH API_CURSOR?
Activity Monitor shows FETCH API_CURSOR instead of the real query? I explain what sp_cursorfetch is and how to find the query running behind the cursor.
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.
SQL SERVER – Simple Use of Cursor to Print All Stored Procedures of Database
A simple cursor with sp_HelpText can print all stored procedures of your database. Switch results to text view with CTRL+T to read them easily.
SQL SERVER – Guidelines and Coding Standards Complete List Download
Coding standards and guidelines matter for every developer. Here is my Coding Standards Complete List in one document you can download and follow.
SQL SERVER – Interview Questions and Answers – Part 2
This is the second part of the blog post series Interview Questions and Answers.Click here to get free chapters (PDF) in the mailbox




