Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 High Availability (2008)
 Sync logins/users between mirror/principal

Author  Topic 

Wrangler
Starting Member

35 Posts

Posted - 2011-05-11 : 12:32:51
Greetings,

I'm curious if there is a right way to keep logins/users in sync between the principal and mirror servers? I've read up on using ssis, sp_help_revlogin, home grown variations of sp_help_revlogin, and our vendor has their own .dll solution to kick off once an automatic failover is detected. I'm just wondering if their is a best way to do it. Any suggestions?

Thank you,

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-05-11 : 12:40:39
There is no best way to do it, but I use this: http://weblogs.sqlteam.com/tarad/archive/2008/06/24/How-to-transfer-SQL-logins-between-SQL-Server-2005-instances.aspx

You can schedule it as a job or whatever.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Wrangler
Starting Member

35 Posts

Posted - 2011-05-12 : 15:19:19
I'll give it a shot. Thank you.
Go to Top of Page

Wrangler
Starting Member

35 Posts

Posted - 2011-06-02 : 11:07:23
Greetings,

This script is working great and is keeping the logins on the Primary and Mirror in sync. I'm curious if I can tighten up the security a little.

Currently I have a Linked Server on each box using sa as the security context. We setup domain accounts on each box to run the SQL agent and that is the account running the job but it's using the sa to connect via the Linked Server. I tried creating an identical SQL Server account on each box with the role securityadmin and I switched out the sa in the Linked Server setting but the job failed. It indicated the failure was due to running the job as the SQL Agent account.

I'm curious if there are security issues with assigning sa to the Linked Server security context and if there is a better way to do it.

Thank you,
Go to Top of Page
   

- Advertisement -