My customer needed to migrate his production database to a new server. The majority of the database is audit messages. The file was initially about 200GB. What I've always done in this situation, to minimize downtime, is to migrate a backup to the new server, then truncate the audit table. This guarantees that anything after the switch is all new data, and once the old database is no longer in use, I export the contents of the Audit table to the new database to make sure all of the audit messages are retained.
The problem here is that I somehow ran the export job 5 times, and now the database is well over 1TB. I've managed to delete all duplicate data from the table, but the file itself is still well over 1TB.
Does anyone have a suggestion on how to clean up this mess? Is the Shrink option the best route, or is there something better?