Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

SQL Server 2000

I've been tasked with cleaning up an SQL database of which I have no history working with so I'm not familiar with the tables within. Short from dropping a table and seeing if anyone hollers, what is the best practice for cleaning up orphan tables? I did not see a "modified date" attribute on the table, only a "created date".

Would the process be the same for SQL Server 2005/8?

Thanks, Dave

share|improve this question

migrated from Oct 8 '11 at 16:33

This question came from our site for professional and enthusiast programmers.

Couple of different approaches you could try with a Profiler trace.

  1. Capture SQL:StmtCompleted, with a column filter on TextData %TableName%.
  2. Capture Lock:Acquired event, with a filter on ObjectID with the id of the table.
share|improve this answer

With SQL Server 2008 you could use the integrated Tracking: Change Tracking Overview

With SQL Server 2000 you have to use triggers and log the data yourself. (Also mentioned in the MSDN Article)

(I prefer the "kill table and wait for problems" solution...)

share|improve this answer
(I prefer the "kill table and wait for problems" solution...) - So I'm not alone here, huh? LOl – dlackey Oct 5 '11 at 15:31
Rename the table first of course. So you can instantly restore it and blame storage/network/client app/anyone else – gbn Oct 11 '11 at 19:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.