|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, February 01, 2012 10:01 PM
Points: 14,
Visits: 71
|
|
Hi Mike,
I enjoyed the article that I found as I was searching for something similar. We are trying to clean up a database where the dba stored every ad hoc report he was asked to create as a stored procedure. I was hoping to find a way to query the INFORMATION_SCHEMA to see what stored procedures had not been used in the last month or more and be able to target them as possible candidates for deletion. Is that possible? Thanks, Tim "DBA jr."
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:11 PM
Points: 143,
Visits: 183
|
|
Tim:
Sorry for the late response. Hopefully by now you have found the solution. The question does raise an eyebrow. Basically, when was the last time a given sproc was fired. I know there are thrid party tools that monitor a database for activity - a table structure was modified, a sprc changed, etc. I do not have an immediate answer.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, March 06, 2013 10:54 PM
Points: 21,
Visits: 176
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 7:51 AM
Points: 7,
Visits: 337
|
|
INFORMATION_SCHEMA.ROUTINES does not return triggers data, look here: [url=http://msdn.microsoft.com/en-us/library/ms188757.aspx][/url]
ROUTINE_TYPE nvarchar(20) Returns PROCEDURE for stored procedures, and FUNCTION for functions.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:11 PM
Points: 143,
Visits: 183
|
|
WOW
I have not seen this article in a long time. IT is pretty cool to see that it is still out there.
|
|
|
|