|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, April 30, 2009 8:27 PM
Points: 7,
Visits: 16
|
|
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
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 4:27 PM
Points: 2,007,
Visits: 6,040
|
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 10:45 AM
Points: 4,007,
Visits: 4,851
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, April 30, 2009 8:27 PM
Points: 7,
Visits: 16
|
|
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
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, April 30, 2009 8:27 PM
Points: 7,
Visits: 16
|
|
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
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 10:45 AM
Points: 4,007,
Visits: 4,851
|
|
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
|
|
|
|