Nice tip. And thanks Kevin for that Idera app, it has been really handfull
]]>Alex – I do the same. In fact I wrote up a procedure that maps orphaned users as you describe – have a look if you wish:
http://allen-mcguire.blogspot.com/2009/10/sql-server-map-orphaned-users.html
I do a lot of restores from production to non-production environements so it comes in handy for me.
]]>It’s worth checking out.
http://www.idera.com/productssolutions/freetools/sqlpermissionsextractor
I’ve always used the sp_change_users_login proc to remap orphaned users to the correct login rather than creating them with the original SID. Just wondering if this (i.e. the proc) isn’t the best way or if there’s other advantages to creating the user with the original SID?
Cheers
]]>Will the following fix the issue by mapping the SQL Login on the new instance to the User in the database and updating the SID for the User as well?
USE database_name;
GO
ALTER USER [database user] WITH LOGIN = [sql language=”login”][/sql];
]]>