Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 who's causing the wait

Author  Topic 

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-03 : 00:58:48
don't know if i'm posting an old question but any help will be appreciated...


is there a way to determine who's causing the wait such as IOCompletion, etc in the current activity window under wait type, (btw,there are no blockings)?

i'd like to determine and control who get's the priority first or which spid i need to kill to give way to critical processes.

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-09-03 : 01:45:01
sysprocesses.SPID


MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-03 : 02:17:19
actually, what i want to know is who is causing a waittype, it's easy for block cause you have a column which tells you that this spid is blocking another spid.

but for waits, is there a way to know which spid is causing the wait?
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2004-09-03 : 02:44:29
Have a poke around NR's site, I think he has a stored proc that gives you that sort of info..

-------
Moo. :)
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-03 : 03:00:39
Thanks Moo, just reviewed his site, no luck
Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2004-09-03 : 03:21:54
Okay, look at the procedure sp_MSset_current_activity. This is how EM generates its current activity view, and that has a "blocked by" column.

-------
Moo. :)
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-09-03 : 05:46:07
Thanks Moo,

I read the entire sproc and I think it's getting the information on syslocks,syslockinfo and spt_values from the sql server application itself aka compiled codes.

Darn, just wish they could have used a stored procedure for inserting OS data into sql. LOLZ.

It turns out, the sysprocess is just saving the last wait type but not which process caused the wait.

quote:
Originally posted by mr_mist

Okay, look at the procedure sp_MSset_current_activity. This is how EM generates its current activity view, and that has a "blocked by" column.

-------
Moo. :)

Go to Top of Page
   

- Advertisement -