Simple Script to get Blocking Info in SQL Server Database:
select * from
(select spID, blocked, program_name, loginame from sys.sysprocesses (nolock) where blocked <> 0) locks,
(select spID, blocked, program_name, loginame from sys.sysprocesses (nolock)) allprocess
where locks.blocked = allprocess.spId
select * from
(select spID, blocked, program_name, loginame from sys.sysprocesses (nolock) where blocked <> 0) locks,
(select spID, blocked, program_name, loginame from sys.sysprocesses (nolock)) allprocess
where locks.blocked = allprocess.spId
No comments:
Post a Comment