July 1, 2018
More on SPIDs… and Killing Them

Something I learned today while looking at an old script. The script kills all SPIDs on a database. I had an instant urge to kill system SPIDs just to see what would happen. And the result was… That’s a good thing though right? One less thing to be worrying about. You can’t kill system SPIDs. […]

May 21, 2018
Logging sp_whoisactive to a table

This is a follow-on post of sp_who, sp_who2 & sp_whoisactive and is a run-through of logging SQL activity to a table. Even if you are equipped with a SQL Server monitoring tool, you still may be having trouble finding that slow/blocking query that runs during the night. Running sp_whoisactive periodically (e.g. every 30/60 seconds) and […]

May 21, 2018
sp_who, sp_who2 & sp_whoisactive

Sp_whatnow? sp_who, sp_who2 and sp_whoisactive are stored procedures that allow you to view current users, sessions, and processes within a SQL Server instance. You'd want to see this for identifying things like blocking or checking general activity. sp_whoisactive is definitely one of my favourite stored procedures. Created by Adam Machanic, this tool gives you an […]

Kill SQL Server SPIDs
April 17, 2018
Killing SQL Server Processes (SPIDs)

There are many reasons why you’d KILL a SPID in SQL Server. Whether it’s impending disk space doom due to data or log file bloat, or a long running query that’s lost in space... When alerted to this situation I’d run sp_whoisactive in the first instance. When the picture is clear, the kill happens. To […]