July 23, 2014 at 9:28 am
I am trying to free up some space in the server by detaching the unused database and deleting the ldf & mdf files. Here are the steps I took
1. Performed a full back up of the database
2. Moved the BAK file to a different location in another server
3. Ran the follwing on the database since it was a publisher in the replication
sp_replicationdboption 'dbcentral,'publish','false'
4.Detach the database
5. Delete the files since I have a full back up.
( I have not performed the last step yet but want to make sure that I am not missing out anything)
Thanks in advance.
July 23, 2014 at 10:26 am
I'd add a step before 5. Restore database from backup on another machine to validate I have a good backup. Otherwise it seems okay.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 23, 2014 at 10:42 am
I'd definitely restore and use the backup before I deleted the original files.
But rather than detach and delete the files yourself, just do a DROP DATABASE, which would be a cleaner method.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 23, 2014 at 10:44 am
Good idea. Thanks!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply