Solved

Tracking recent use on SQL Server Database

Posted on 2006-07-10
6
181 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 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server maintenance plan 8 53
Conditions in Where clause 9 46
Related to SQL Query 5 19
What Is an Error? 2 21
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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
Via a live example, show how to shrink a transaction log file down to a reasonable size.

740 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