January 24, 2006 at 1:53 am
Without using 'sp_who' and 'sp_who2' stored procedures, Can I find the process id of blocking process.
January 24, 2006 at 2:16 am
If you look inside sp_who / sp_who2 you can see that they get their blocked info from master..sysprocesses.
/Kenneth
January 24, 2006 at 2:24 am
But sysprocesses contain only process id of the blocked process it doesn't contain the id of the blocking process.
How to get that? Actually I want to form a table with
the blocked and blocking id's...
..hema
January 24, 2006 at 6:24 am
Ah, but it does...
sysprocesses.spid contains the actual spid
sysprocesses.blocked if > 0 means two things - spid is being blocked, and the value here is the blocking spid.
Have a look in BOL for more details on sysprocesses table.
/Kenneth
January 25, 2006 at 5:13 pm
Here's a little something for all of the system tables ...
http://www.microsoft.com/sql/prodinfo/previousversions/systables.mspx
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply