Friday, May 8, 2009

How to UNLOCK a table in MS SQL ?

Follow this steps to UNLOCK the sql table which has been LOCKED  by some other process/script.



 1.  sp_lock      --Run this  
 2.  sp_who2     --Run this  
 3.  Look for Status column and the DBName column.  
 4.  Get the session Id from SPID.  
 5.  Kill <SPID>    --Run this  

No comments:

Post a Comment

Code Formater

Paste Here Your Source Code
Source Code Formatting Options
1) Convert Tab into Space :
2) Need Line Code Numbering :
3) Remove blank lines :
4) Embeded styles / Stylesheet :
5) Code Block Width :
6) Code Block Height :
7) Alternative Background :
Copy Formatted Source Code
 
Preview Of Formatted Code