Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2005, 08:06 AM
Authorized User
 
Join Date: Jul 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default When a sproc or table was Last Used

How can I determine when a sproc or table was last used?
I suspect that I have many obsolete tables and sprocs in my database but how can I find out for sure??
Thanks,
DL
 
Old September 29th, 2005, 08:09 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The only way I have seen this done is to edit the stored proc with some code in the very beginning to write to a log file every time the stored proc was run, and perhaps track the user id. I don't believe SQL has any built in functionality to do this.

There are some third party tools designed to do that type of thing on Oracle servers, I am not sure if they have been ported to MS SQL. Another thing for you to possibly use is sql trace, running to some sort of a log file.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with sproc Bob Bedell SQL Server 2005 10 January 20th, 2008 08:52 AM
Get sproc return value from ObjectDataSource Bob Bedell ASP.NET 2.0 Professional 3 January 19th, 2008 10:22 PM
dynamic sproc sabry SQL Language 1 August 25th, 2006 06:23 AM
nested sproc temp table cole SQL Language 1 June 9th, 2005 05:27 PM
WHERE BETWEEN search condition in sproc jtyson SQL Server 2000 1 August 7th, 2003 09:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.