We have a production database which is replicated on another server at a remote location. The local database users (not logins) are also replicated in this database. However, the SQL logins are not replicated from production to the remote server.
What is the best way to replicate "logins" to the remote server with passwords and all?
Here's my approach and I need to know if I'm going the right direction.
- Need help with a script that will drop all logins on the replicated server.
EXEC [production server instance].[master].[dbo].[sp_help_revlogin]from the replicated server to get an accurate production list of logins.
- Find a way to actually execute the results from
sp_help_revloginthat will script out the logins on the replicated server with hash passwords, SIDs etc.
Any major problems with my approach? If not, I could use some help actually writing the scripts or outline the exact process for 1-3 (made some attempts but have had problems getting the scripts to work).