SQL Server monitoring rogue processes

Run one of these queries to check if there are any SPIDs with Blocked Status or High CPU time. It also shows the hostname, loginname, logintime info.

SELECT * FROM sys.sysprocesses
-- or this one
Sp_who2 

Run this command to get the SQL for a SPID

DBCC INPUTBUFFER (<SPID>)

Run this command to get more info about the lock

EXEC SP_LOCK <SPID>

Comments

Popular posts from this blog

Parse XML to dynamic object in C#

C# Crop white space from around the image