Anyone point my at a utility for syncing sql server logins after restoring a database to a different server?
I know I can do it with scripts, but I've been using a wonderful little utility - 'Db Maint Sync SQL Logins' (http://www.dbmaint.com/SyncSqlLogins.asp) to do it on sql server 2000 which unfortunately doesn't support 2005 and I'm loath to go back to actually thinking :-)
sp_change_users_login
with the Update_One
action can map a login in a database to a user on a new server.
You can use sp_change_users_login
with the Auto_Fix option to automatically link logins and users with the same name.
If when you're setting up the server, you script the logins along with their SIDs, then you won't have the mismatched user and login problem at all.
The sync sql server logins tool by dbmaint has a sql server 2005 version:
link text