?
Solved

Tracking recent use on SQL Server Database

Posted on 2006-07-10
6
Medium Priority
?
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 672 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 664 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 664 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

771 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