Tracking recent use on SQL Server Database

Hi,
I need a way of finding out when a particular stored procedure was launched on our SQL Server. My problem is that at some point in the past few hours I believe that someone may have launched a particular stored procedure on our SQL Database and I need to track down any information i can about recent activity concerning this SQL Database, specifically in relation to the possible stored procedure launches I have just mentioned.
Hope you can help
;)
Paul-BrooksAsked:
Who is Participating?
 
Racim BOUDJAKDJIConnect With a Mentor Database Architect - Dba - Data ScientistCommented:
You need to custom code that kind of tracking within a stored procedure scheduled to run periodically as a job.
0
 
ptjcbCommented:
Sorry, SQL Server does not automatically keep that data, as Racimo mentions you would have to write that yourself. You could add a couple of lines to the stored procedure that would, in the future, write to a table when the sp was run and who started it.
0
 
imran_fastConnect With a Mentor Commented:
You can also use sql spy.

www.snapfiles.com/get/sqlspy.html 
0
 
Kobe_LenjouConnect With a Mentor Commented:
If you have a full logged database, install some transaction log tool (google for it, there are some excellent tools available) and search in that tool for the execution of the sp/query or go to the point in time where you suspect the sp to have ran..

This is the only info you can dig up.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.