Fórmulas e Cenas

Object Reference Not Set to an Instance of an Object

  Home  |   Contact  |   Syndication    |   Login
  45 Posts | 0 Stories | 14 Comments | 0 Trackbacks

News

Archives

Post Categories

Links

June 2011 Entries

/* 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