Query to find usused stored procedures,views

  • hi,

    please help me out in finding unused stored procedures in ms sql 2000

  • It's not really possible to determine which procedures are not used. Instead, you need to determine which procedures are used and then, by process of elimination, you can choose to remove the ones that didn't make the list.

    The best way to do this would be to capture trace data, using a server-side trace (which can be defined in the Profiler). You'll need to figure out a schedule for running it. Either continuous, and you deal with all the data it will produce, quite a lot, or you run it intermittently, but in such a way that you can cover a 24 hour cycle. It really depends on your business, but most of the systems I've worked with have a monthly and, possibly, an annual cycle that you'll need to take into account.

    It's actually very hard to identify the procedures that are NEVER used from those that are not used right now.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Thanks a lot for your suggestion 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply