How we can move the login which has Sysadmin role.

,

We are using sp_help_revlogin to make login script, but it doesn't enable the login which has sysadmin role. It is very common problem during server migration. We use the this technique to solve the issue.

Workaround:  How you can enable the sysadmin role correctly for all the login which has sysadmin role.

This script creates the command in old server which need to execute to the new server.

select name ,'sp_addsrvrolemember [' +name + '], sysadmin'
from master.sys.server_principals where IS_SRVROLEMEMBER ('sysadmin',name) = 1

Rate

3.67 (3)

Share

Share

Rate

3.67 (3)