How do you find out blocking in sql ?

Find blocking in single database.

->Run sp_who2

->By running above sp,we can able to find out blockings by presence of blkby column value.

->Find the spid related to the  blkby value row.

->Find the sql statement responsible for blocking by

DBCC INPUTBUFFER(spid)

->if select statement pertaining to that spid means,kill that spid.

 KILL spid

->if insert,update,delete statement pertaining to that spid means,discuss with customer before killing the spid.


Comments

Popular posts from this blog

SQL Server:Steps to Configure Database Mirroring by T-SQL Script.

SSIS2008R2 Error: 0xC0209303 at Package: