Solved

script synchronize logins and permissions between principal and mirror servers

Posted on 2014-12-07
3
88 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 47

Expert Comment

by:Vitor Montalvão
ID: 40486582
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
ID: 40487609
Thanks but  I search to transfer login or synchronize them
0
 
LVL 47

Accepted Solution

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

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Set OWA language and time zone in Exchange for individuals, all users or per database.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

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