SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restore database in a mirrored environment


Restore database in a mirrored environment

Author
Message
hanslopes
hanslopes
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 3
We have a SQL server 2005 environment we are testing, with a principal and mirror but no witness. The database copy is quite old and we now have a newer version (from the live environment sql 2000) that we wish to put on.

I am trying to understand what the best process is to restore this new database copy in an already mirrored environment.

All the documents I read refer to setting up mirroring from scratch not this particular scenario.

From what I have read we cannot simply pause mirroring we would have to turn off mirroring completely, either using the interface or a sql command of set partner off (does this need to be run on both machines?)

We then restore the backup to the principal and at the same time restore to the mirror (with no recovery?).

Once the restores have finished set up mirroring again.

I am hoping someone can confirm what the best way of doing this would be?
Nikhil Shikarkhane
Nikhil Shikarkhane
SSC-Addicted
SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)

Group: General Forum Members
Points: 470 Visits: 203
Well I would presume that one has to remove the mirror, restore the database and re-establish the mirror.
I have never done it before.
Let us know how you do it and whats the outcome.
Thanks.
franzambesten
franzambesten
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1247 Visits: 109
How can I restore a database in a mirroring context after removing the database mirroring configuration. I ask that, because I note an alert that says me that the database is in use, I think that because the witness an the secondary server still mantaining a connection to the principal server. How are the correct steps for disabling the mirroring, restoring the database and re-enabling the database mirroring environment?

Thanks in advance.
Dev
Dev
SSCrazy Eights
SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)

Group: General Forum Members
Points: 9156 Visits: 1602
While a database mirroring session is active, the following restrictions apply:
• Backup and restore of the mirror database are not allowed.
• Backup of the principal database is allowed, but BACKUP LOG WITH NORECOVERY is not allowed.
• Restoring the principal database is not allowed.
franzambesten
franzambesten
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1247 Visits: 109
Yes, I know that, I need to know which are the steps to follow to accomplish this goal, after disabling the mirroring...
Dev
Dev
SSCrazy Eights
SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)

Group: General Forum Members
Points: 9156 Visits: 1602
franzambesten (11/30/2011)
Yes, I know that, I need to know which are the steps to follow to accomplish this goal, after disabling the mirroring...


Database Mirroring Administration How-to Topics (Database Engine)
http://msdn.microsoft.com/en-us/library/ms175059(v=SQL.90).aspx
Steve Jones
Steve Jones
SSC Guru
SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)

Group: Administrators
Points: 148486 Visits: 19444
Once you've removed mirroring (http://msdn.microsoft.com/en-us/library/ms189112%28v=SQL.90%29.aspx), you can just restore both dbs and re-setup mirroring.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
nat 14011
nat 14011
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 5
I know this is a really old thread, but I wanted to ask this... In SQL 2012 I see there is a "Pause" mirroring button... would this suffice in order to restore from a .bak backup file? Or do we still need to break and reconfigure the mirroring in order to restore?

Thank you
Steve Jones
Steve Jones
SSC Guru
SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)SSC Guru (148K reputation)

Group: Administrators
Points: 148486 Visits: 19444
I think so, but I could be wrong.

the main issue is mirroring relies on a log chain, just like log shipping (or similar to LS).

If you restore, the chain becomes somewhat broken, depending on what you're restoring (from when/which backup). My suspicion is any restore will require you to reinitialize DM, and that if you're not restoring from an extremely recent backup, this is a reset of mirroring.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
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