Hello everybody,
I have 3 environments Prod/Test/Dev where I (and other database developers) periodically need to transfer databases from Prod to Test or from Test to Dev (using backup/restore). Obviously, this results in orphaned database users, because after restore their SID don't match the login SIDs on the target server. I repair this with ALTER USER ... WITH LOGIN='...' or withsp_change_users_login (old way). Now I'm thinking about recreating the logins in Test and Dev with SID option so that their SIDs match those in the Prod environment (then remap the users last time). Thus I wouldn't need to remap users any more.
Are there any hidden gotchas in this approach? Using SQL Server 2008 R2.