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)
 Running SPs

Author  Topic 

BigRetina
Posting Yak Master

144 Posts

Posted - 2003-12-29 : 03:37:41
Salute...
How can we get info for CURRENTLY running SPs?..programatically and not using Profiler!.
Thanks In Advance

Andraax
Aged Yak Warrior

790 Posts

Posted - 2003-12-29 : 06:56:26
Hi!

You should be able to build something yourself, using DBCC INPUTBUFFER (<spid>) and sp_who or sp_who2, or the sysprocesses table. In order to find active processes you can read the status from the sp_who/sp_who2, and DBCC INPUTBUFFER shows the last command sent to the process. Then just look for exec/execute statements and match up the proc names.

Go to Top of Page

BigRetina
Posting Yak Master

144 Posts

Posted - 2003-12-30 : 10:53:28
Hi Again...
I already tried using DBCC INPUTBUFFER (<spid>) and sp_who or sp_who2, and the sysprocesses table...and i came up with NOTHING!..There is nothing in those that can tell me if sp_XYZ is running or in RUN status..etc..!
Please Advise...
Thanks In Advance
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2003-12-30 : 12:05:39
Try this: http://vyaskn.tripod.com/fn_get_sql.htm


===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-12-30 : 12:45:20
And not 1 link back to sqlteam...

Good interview questions there also...



Brett

8-)
Go to Top of Page

VyasKN
SQL Server MVP &amp; SQLTeam MVY

313 Posts

Posted - 2003-12-30 : 18:10:21
quote:
Originally posted by X002548
And not 1 link back to sqlteam...

Talking about my site? I do have a link back to SQLTeam :-)
Check out: http://vyaskn.tripod.com/sqlserverres.htm

--
HTH,
Vyas
http://vyaskn.tripod.com
Go to Top of Page
   

- Advertisement -