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


Manually failing over a mirror without access to Primary Server


Manually failing over a mirror without access to Primary Server

Author
Message
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36134 Visits: 9263
I am putting together a disaster recovery plan. As part of this, we have databases mirrored over to a server (Server B) to which we have limited access (db_owner as opposed to sysadmin permissions). Server B (the secondary) is in a separate data center from Server A (the primary). I've created a job to initiate failover of the mirrors in case of database failure, but the one contingency I can't seem to cover is data center failure. I've looked everywhere but cannot find a method of failing over mirrored databases if I don't have access to the primary server.

So here's my question (because I need to put it in my plan): If my data center or Server A goes down entirely, how do I fail over the mirror to Server B?

Everything I have found in BOL says I have to do this from the primary server. Maybe I missed a reference somewhere?

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
John Mitchell-245523
John Mitchell-245523
SSC-Dedicated
SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)SSC-Dedicated (33K reputation)

Group: General Forum Members
Points: 33189 Visits: 16640
Brandie

Is it a witness you're looking for?

John
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36134 Visits: 9263
John Mitchell-245523 (8/15/2014)
Brandie

Is it a witness you're looking for?

John


I wish. Corporate set up the mirroring without a witness server. @=(

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)

Group: General Forum Members
Points: 51434 Visits: 17653
Brandie Tarvin (8/15/2014)
So here's my question (because I need to put it in my plan): If my data center or Server A goes down entirely, how do I fail over the mirror to Server B?

Everything I have found in BOL says I have to do this from the primary server. Maybe I missed a reference somewhere?

You only issue the ALTER DATABASE ... SET PARTNER FAILOVER against the principal when the principal is actually online.
In the situation you're describing, you must either connect to the mirror server and use ALTER DATABASE ... SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS or leave the mirror offline until the principal is brought back online or stop the mirror session to recover the database and start a new mirror session later on.

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36134 Visits: 9263
Thanks, Perry. I appreciate the assist.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36134 Visits: 9263
On another note, I recently found that I can also just break the mirror from either the primary or the secondary as per this BOL note. So it all depends on whether or not I want to just set the failover or break the mirror entirely.

Breaking the mirror seems a little last resort to me, though.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)

Group: General Forum Members
Points: 51434 Visits: 17653
Brandie Tarvin (8/21/2014)
On another note, I recently found that I can also just break the mirror from either the primary or the secondary


Yes, hence my comment
comment
Perry Whittle (8/19/2014)
or stop the mirror session to recover the database and start a new mirror session later on.


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: General Forum Members
Points: 36134 Visits: 9263
And that's what happens when I forget how to read a post all the way through. @=)

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
arnipetursson
arnipetursson
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1301 Visits: 1019
One more question.

If you do not have access to server B beyond db_owner in the database,
how do you ensure that the logins (server principals) are synced?
happycat59
happycat59
SSCrazy Eights
SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)SSCrazy Eights (8.4K reputation)

Group: General Forum Members
Points: 8357 Visits: 3281
arnipetursson (8/21/2014)
One more question.

If you do not have access to server B beyond db_owner in the database,
how do you ensure that the logins (server principals) are synced?


As db_owner, you cannot do anything except ask someone else to sort it out (e.g. someone with sysadmin or securityadmin priveleges).
You would already need to be doing that - mirroring does not do anything about logins. Logins are at the server level, database mirroring is at the database level.



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