Solved

Tracking recent use on SQL Server Database

Posted on 2006-07-10
6
177 Views
Last Modified: 2006-11-18
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
;)
0
Comment
Question by:Paul-Brooks
6 Comments
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 168 total points
ID: 17072261
You need to custom code that kind of tracking within a stored procedure scheduled to run periodically as a job.
0
 
LVL 27

Expert Comment

by:ptjcb
ID: 17072313
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
 
LVL 28

Assisted Solution

by:imran_fast
imran_fast earned 166 total points
ID: 17072320
You can also use sql spy.

www.snapfiles.com/get/sqlspy.html
0
 
LVL 8

Assisted Solution

by:Kobe_Lenjou
Kobe_Lenjou earned 166 total points
ID: 17079614
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

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now