December 19, 2012 at 4:52 am
Hey,
Each of my customers has his own database. Sometimes a customer quits. When that happens, I want to archive that database. My idea is:
1) Make a full backup to "\\backupserver\final_backups\FINAL_BACKUP_CUSTOMERNAME.BAK"
2) Detach the database "DBCUSTOMER"
3) Delete the files DBCUSTOMER.MDF and DBCUSTOMER_LOG.LDF
Is this the way to go? And if so, how do I do step 3 with T-SQL?
Thanks,
Raymond
December 19, 2012 at 5:02 am
Why not just drop the database after you have backed it up?
December 19, 2012 at 5:28 am
That simple eh...
Thanks!
Raymond
December 20, 2012 at 8:20 am
Just a thought, I would also keep and stash away a copy of the associated logins scripted out using the sp_help_revlogin procedure. That way, you can reinstall the database on another server if needed, and it will keep the same security ID's for the logins, and any SQL Authentication passwords.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply