Inherited database carrying dozens of obviously abandoned tables, backup copies from 2016, someone's tmp experiments, staging leftovers. I want them gone but carefully.
What is the safe procedure for a bulk table cleanup, dependencies included?
Inherited database carrying dozens of obviously abandoned tables, backup copies from 2016, someone's tmp experiments, staging leftovers. I want them gone but carefully.
What is the safe procedure for a bulk table cleanup, dependencies included?
The command is one line, DROP TABLE name, so the craft is entirely in the safety around it. A procedure that has cleaned many inherited databases without a single restore:
The 2016 backup copies deserve one extra glance before the pipeline: occasionally the backup copy is the live table and the properly named one is the abandoned twin, five minutes with row counts and recent timestamps per pair settles which is which. Inherited databases keep that particular joke in stock.
The rename quarantine caught one table on day nine, a quarterly report nobody mentioned owned it. Everything else stayed silent and dropped cleanly this morning, 31 tables and 12GB gone with scripts and backup as the exit. Procedure adopted permanently.