ibgadmin
asked on
Copy Server logins and SQL Server roles and permissions
We have a physical server running Windows Server 2003 with SQL Server 2005. We are moving to a new Windows Server 2012 with SQL Web 2014 environment and would like to see if it was possible to move the server logins as well as db permissions and roles. Does anyone know if this is possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://support.microsoft.com/en-us/kb/918992
execute the sp_help_revlogin SP in master database and it will generate the create login script for you then copy the script and execute on target server.
Because users are mapped with the login sid and this SP generate login script with SID so rare chances of orphan users. But you can run below script to check the orphan users.
use <database>
go
exec sp_change_users_login 'report'
If orphan users exist in the database
you have to run this script to remap.
use <database>
go
exec sp_change_users_login 'Auto_fix', '<username>'