Geeks With Blogs
Fórmulas e Cenas Object Reference Not Set to an Instance of an Object
/* 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 Geral , Database | Back to top


Comments on this post: How to find locks in sql server 2000

# re: How to find locks in sql server 2000
Requesting Gravatar...
thank you very much
Left by Exprok on Apr 06, 2017 5:32 AM

Your comment:
 (will show your gravatar)


Copyright © Sglima | Powered by: GeeksWithBlogs.net