Identify obsolete objects in a Database

  • I have a big and old database that has been growing the last 5 years (different DBA’s, USERS, etc). Now my job is to purge all those objects that aren’t in use anymore and leave the ones we use.

    Is there any way in SQL 2005 to find out what objects aren’t in use anymore?

    I appreciate the advice.

  • for tables with indexes you can use sysindexes to see when they were last used. for all objects (Sp's, views etc) you could run a profiler trace for a while and then export all the unique object id's that were used. that way you could run a query to compare all objects against your profiler trace and see which ones were not accessed. rename those objects and leave it be for a while. if nothing fails you are probably alright to delete if thats the long term goal.

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

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