Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restoring database from production to Dev


Restoring database from production to Dev

Author
Message
kevaburg
kevaburg
Mr or Mrs. 500
Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)

Group: General Forum Members
Points: 579 Visits: 922
george sibbald (3/20/2013)
to everyone out there, attach with rebuild log is a last resort, please don't replace restores with it.


Apart that only a restore can replace a damaged mdf file, is there any other reason you wouldn't use it?
george sibbald
george sibbald
SSCertifiable
SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)SSCertifiable (6.3K reputation)

Group: General Forum Members
Points: 6326 Visits: 13687
in this situation its totally unnecessary, a restore will overwrite the database as you want it.

why start detaching production databases and then not using the log file when you don't have to? No proper database recovery phase can take place without the original log file. Rebuild log is a last resort command if you don't have a log file or a suitable backup, it should be followed by a dbcc checkdb to check no corruptions. This is a method of restoring a database from production to development that is asking for trouble and I would not recommend.

---------------------------------------------------------------------
kevaburg
kevaburg
Mr or Mrs. 500
Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)

Group: General Forum Members
Points: 579 Visits: 922
I see your point. Thanks for the comment!
kevaburg
kevaburg
Mr or Mrs. 500
Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)Mr or Mrs. 500 (579 reputation)

Group: General Forum Members
Points: 579 Visits: 922
Hi folks,

I just want to point out that although I have been ranting on about the benefits of attach/detach for a database test machine, I have to concede I have missed to many valid points out to be able to validate my arguments anymore. In particular:

When I use FOR ATTACH_REBUILD_LOG I obviously no longer have a logfile. To that end there is no ability to rollback inconsistent or uncommitted transactions on startup, hence an inconsistent state. I was warned of that several times here but didn't think deeply enough.

To that end, there is truly no replacement for a good backup and recovery strategy and my own environment now reflects that.

Many thanks to all for your constructive comments (even if sometimes they were the result of an enormous amount of patience!).

Kev
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search