How to identify stored procedures, views and tables not accessed/called in the past month?

Objective: To clean up database by removing unused stored procedures, tables and views.

Question: How can I identify what stored procedures, tables and views that have NOT been used in the last month?

Environment: SQL Server 2005
Who is Participating?
Aneesh RetnakaranDatabase AdministratorCommented:
there is no easy way you need to check the frontend codes and the stored procedures for sp calls ..
sql server stores only the recently executed statetments in its cache.
also you can run the sql profiler to find out the currently executing stored procedures
there is no good way to do this.  you'd have to either run a trace for a month to capture the procedures that have been executed or you'd have to write logic into your procs to record when they're ran.  No other way to do this.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.