February 12, 2015 at 11:15 am
I created a SQL authentication login 'Mylonig' on Server A (named instance) with 'sysadmin' privilege. I am trying to move logins from server A to Server B (named instance on same server i.e. laptop). I ran 'sp_hexadecimal' and 'sp_help_revlogin' on Server A and copy the out put and pasted on Server B and ran it which created 'Mylogin' on Server B.
Now when I check properties on 'Mylogin' on Server B it is not 'sysadmin'!!!! but just a 'public'. Am I missing something here?
February 12, 2015 at 11:20 am
that just copies logins featuring their hashed password, and not their associated roles.
grab this version, which is enhanced to do exactly that:
http://www.tinyint.com/index.php/2009/07/08/sp_help_revlogin-cleaned-up-and-revised-with-roles/
Lowell
February 12, 2015 at 11:38 am
Thanks for the reply Lowell. just have few questions:
1. Is it OK just to copy login using sp_help_revlogin and give 'sysadmin' role later? will it work?
2. what's the best solution to copy logins which there is Mirroring between server A and B?
Thanks
February 12, 2015 at 11:49 am
Tac11 (2/12/2015)
Thanks for the reply Lowell. just have few questions:1. Is it OK just to copy login using sp_help_revlogin and give 'sysadmin' role later? will it work?
yes that will work, just add your user back to the sysadmin role. that's what i used to do, before i grabbed that link i showed you, and added if not exists() logic to it.
2. what's the best solution to copy logins which there is Mirroring between server A and B?
Thanks
what you've already done, is the best way, the enhanced version is a little better, but ti's definitely how i've always done it.
Lowell
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply