obsolete tables

  • I have inherited a site with a db that has many obsolete tables. Short of wading thru all source code does anyone know how to weed out the useless tables.

  • Run a trace for a good long time (days) and look for references?

    Then there's always the drop one at a time and see who squeals...(!)

    sysdepends system table gives you some info, but is not always dependable... I'd probably go the trace route.

  • We were in such a situation once...we created a profiler template and asked the QA team to run through each and every module of the application.  That way, we were able to identify the tables and the indexes that were being used.

  • Instead of dropping them one at a time, try renaming them one at a time.  Then after a certain time period you cound drop them.

    Steve

  • RShrama can you be a bit more specific about the process you just mentioned there?

  • sql.rohit,

    Look into running a trace for the specific information and events you need. You can do this with Profiler but if you want to run it more long term, look into a Server Side Trace.

    http://www.sqlservercentral.com/Forums/Topic909777-146-1.aspx

    Steve

Viewing 6 posts - 1 through 5 (of 5 total)

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