http://www.sqlservercentral.com/blogs/steve_jones/2013/09/18/the-dangers-of-detach/

Printed 2014/12/20 06:39PM

The Dangers of Detach

By Steve Jones, 2013/09/18

I ran across a twitter conversation about a post recently. The post talks about detaching or attaching databases in bulk.

I agree that detaching databases in some cases is bad, but it’s not necessarily something I’d avoid. Detach is a good way to prep for upgrades, movement, etc. It may or may not be faster than backup/restore, depending on your environment, but it’s something to consider.

However.

If you are going to detach, there are a couple things I’d recommend. First, make sure you have a good backup. A backup is just that, a backup plan, a backup file, a way to recover when things go wrong. It isn’t your data, it’s a copy. A detached mdf is your data. Make sure you have a backup before detaching and messing with files.

Second, never move files. Never, ever, ever, ever, move database files. Detach/attach is a valid way to move databases, but always copy the files.


Filed under: Blog Tagged: administration, sql server, syndicated
Copyright © 2002-2014 Simple Talk Publishing. All Rights Reserved. Privacy Policy. Terms of Use. Report Abuse.