Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Manually failing over a mirror without access to Primary Server Expand / Collapse
Author
Message
Posted Thursday, August 21, 2014 11:47 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 1:56 PM
Points: 6,365, Visits: 13,695
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?

Curious, how did you manage to implement the mirror session in the first place.


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

"Ya can't make an omelette without breaking just a few eggs"
Post #1606113
Posted Friday, August 22, 2014 4:03 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:45 AM
Points: 7,214, Visits: 6,356
happycat59 (8/21/2014)
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.


I've already provided the server owners with a list of jobs and logins I need created on the server. When I failover, all I have to do then is run the update users proc to resync everything. If some logins don't sync because of different SIDs or other issues, I'm db_owner on those databases, so I can just manually add them to the DB after deleting the orphaned login out of the database.

Of course, keeping up with login changes is my responsiblity. Anytime something gets added or removed, I have to communicate that to the server owners. But that's why we use SQL logins and Windows Groups instead of individual logins. When people leave the company or get newly hired, we just make sure they're part of the proper Windows Groups so there's little back and forth on that particular issue.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1606177
Posted Friday, August 22, 2014 4:05 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:45 AM
Points: 7,214, Visits: 6,356
Perry Whittle (8/21/2014)
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?

Curious, how did you manage to implement the mirror session in the first place.


The server owners did it for us. When we get to End of Life, we're going to look for a better solution, but we needed this in a hurry so we were granted limited perms on someone else's server. Of course testing the solution requires the server owners cooperation (which is going to be a pain), but it's better than not having a DR solution at all.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1606179
Posted Saturday, August 23, 2014 7:24 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 9:11 AM
Points: 417, Visits: 2,555
Hi Brandie,

"I've created a job to initiate failover of the mirrors in case of database failure"

Do you mind sharing how you setup the job?


Regards,
SQLisAwe5oMe.
Post #1606821
Posted Monday, August 25, 2014 6:52 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:45 AM
Points: 7,214, Visits: 6,356
SQLisAwE5OmE (8/23/2014)
Hi Brandie,

"I've created a job to initiate failover of the mirrors in case of database failure"

Do you mind sharing how you setup the job?


The job I set up is for when I have access to the Data Center and the primary server. It's very simple (with a lot of notes in the job's General tab).

USE master;
GO

ALTER DATABASE DB1 SET PARTNER FAILOVER;
GO

ALTER DATABASE DB2 SET PARTNER FAILOVER;
GO

ALTER DATABASE DB3 SET PARTNER FAILOVER;
GO

ALTER DATABASE DB4 SET PARTNER FAILOVER;
GO

ALTER DATABASE DB5 SET PARTNER FAILOVER;
GO

Then I disabled the job so everyone would know that it shouldn't be run on a schedule and named it "DBA_VendorX_DR_MirrorFailover_Job".

EDIT: I forgot to mention... This vendor uses a table to store path names for reports, files, server and instance names (YAY! Data driven stuff!). So on the DR (secondary) server, I have a job that updates all those keys to point to the DR locations once the mirrors are failed over.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1607048
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse