top of page
Writer's pictureMadeira Team

Copy Login

Sometimes you need to create a new login from an existing login. For example, recently I helped one of my customers to move all the Windows logins to SQL Server logins as part of an overall architecture change. When you need to create a new login from an existing login, you need to address the following issues:

  1. Login Properties

  2. Server Role Memberships

  3. Server Level Permissions

  4. Related Database Users

  5. Database Role Memberships

  6. Database Level Permissions

This script takes care of everything. Once you put your values in @OldLoginName, @NewLoginName and @NewPassword, it will create a new SQL Server login with the requested name and password, and it will copy all the relevant data from the old login.


0 comments

コメント


STAY IN TOUCH

Get New posts delivered straight to your inbox

Thank you for subscribing!

bottom of page