Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

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
2 Solutions
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.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now