Solved

script synchronize logins and permissions between principal and mirror servers

Posted on 2014-12-07
3
86 Views
Last Modified: 2014-12-09
Hello,

I search a script to synchronize logins and permissions between principal and mirror servers.

Thanks

Regards
0
Comment
Question by:bibi92
  • 2
3 Comments
 
LVL 45

Expert Comment

by:Vitor Montalvão
Comment Utility
The users are already in both databases, right? You just need to create the logins, correct?
You could create a script for the logins in the principal server and run it in the mirrored server and after that just run the following command for each user in the mirrored database:
EXEC sp_change_users_login 'Auto_Fix', 'UserName'
0
 

Author Comment

by:bibi92
Comment Utility
Thanks but  I search to transfer login or synchronize them
0
 
LVL 45

Accepted Solution

by:
Vitor Montalvão earned 500 total points
Comment Utility
This MSDN article has a script that do that.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now