Geeks With Blogs
Fórmulas e Cenas Object Reference Not Set to an Instance of an Object June 2011 Entries
How to find locks in sql server 2000
/* Processes that are blocking others */
select * from 
sysprocesses
where spid in
(
select 
	blocked
from 
	syslocks l
	inner join sysprocesses p on p.spid=l.spid
where 
	p.dbid=5 -- Database ID
	and p.blocked<>0
)

/* Processes being blocked*/
select 
	p.*
from 
	syslocks l
	inner join sysprocesses p on p.spid=l.spid
where 
	p.dbid=5
	and p.blocked<>0

 

Posted On Thursday, June 16, 2011 11:03 AM

Copyright © Sglima | Powered by: GeeksWithBlogs.net | Join free