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
 General SQL Server Forums
 New to SQL Server Programming
 To get all the SPIDs

Author  Topic 

avmreddy17
Posting Yak Master

180 Posts

Posted - 2007-11-13 : 13:11:26
is there any way to get all the SPID's running a particular Stored Proc?

Thx
Venu

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-13 : 13:21:12
You'd have to trace this information via SQL Profiler.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-11-13 : 15:43:00
Or query sysprocesses.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-11-13 : 15:55:07
Using sysprocesses, sp_who, or sp_who2 is not a good idea as you'd have to continuously re-run your query to get the results. It is much better to trace the information to a file or table so that you can later review the results.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -