March 21, 2009 at 5:03 pm
Is there anyway to know if a certain SP is running at a certain time?
I am sure it should be possible using the Profiler, but I need to know it using a script or view or something I can check a lot of times.
March 22, 2009 at 4:23 pm
I can think of two options ...
What you can do is implement a Server side trace; that filters on the text data and only tracks following events:
SP:Starting
SP:Completed
Another option is (might run into some process red-tape):
Implement a quick audit statement in proc; so every time it is called it writes to your audit table.
Thanks.
Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
Microsoft FTE - SQL Server PFE
* Some time its the search that counts, not the finding...
* I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]
March 23, 2009 at 8:28 am
If you're trying to check to see if a particular procedure is running at, say, noon, you can could query the sys.dm_exec_requests DMV to see if it's there.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply