STAY IN TOUCH

Get New posts delivered straight to your inbox

  • Madeira 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.


#security

JOIN OUR MAILING LIST

CONTACT US

4 Itzhak Ben Zvi, Hod-Ha'sharon,

Israel 4537302

 +972-9-7400101

  • Google+ - White Circle
  • Facebook - White Circle
  • Twitter - White Circle
  • LinkedIn - White Circle