April 23, 2009 at 2:36 am
Hi,
I want to copy a set of windows Logins & Database Logins from one server to other sever with same roles setup & Passwords.
Please guide me how to do this.
Cheers,
Anil
April 23, 2009 at 7:31 am
Take a look at http://support.microsoft.com/kb/918992. This works in 2008 as well as 2005.
April 23, 2009 at 9:13 am
I've used this script, which is a modified version of sp_help_revlogin, to script out logins, server roles, database users, database roles, and object permissions. Remember that the databases need to exist in the destination server before you can create users. Considering that, you might as well backup and restore the databases, which would also move the database users and their permissions.
http://www.sqlservercentral.com/scripts/31776/
Greg
April 23, 2009 at 5:50 pm
Hi All,
Thanks for the reply. If we Back up & restore the database in another server whether all security Objects like Users,
Roles etc will also move to new server.
Suppose if some of the users alreday exists on new server is there any way to skip that users.
Please let me know on this.
Cheers,
Anil
April 23, 2009 at 9:32 pm
Hi All,
Sorry, One more question if the User IDs already exists in the server I need replace the User IDs during Copy of logins.
Please let me know is this possible?
Cheers,
Anil
April 24, 2009 at 9:34 am
Anil Kumar Kurra (4/23/2009)
Hi All,Thanks for the reply. If we Back up & restore the database in another server whether all security Objects like Users,
Roles etc will also move to new server.
Suppose if some of the users alreday exists on new server is there any way to skip that users.
Please let me know on this.
The difference between a login and an user - a login allows a person to connect to SQL Server; a user allows a person to access objects in a database.
So users only exist in databases. If you restore a database users, roles, and schemas are also restored. After copying logins and databases to a new server, you may need to re-sync the users with their logins. See sp_change_users_login in BooksOnLine.
Greg
December 2, 2014 at 1:44 pm
Hi SSCarpal Tunnel,
And thanks for providing excellent script and saving be lot of headaches.
Cheers.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply