Adding Logins

To add logins to the server and, optionally, to add users with appropriate roles and authorization to one or more databases you must meet the required role to follow the command or procedure.

Prerequisites
Ensure that you have the required role and authorization to perform each step assigned to you.
Task

See the referenced documents for details.

  1. Add a login for the user.
    • Role: System security officer
    • Procedure: sp_addlogin
    • See: Security Administration Guide
  2. Add the user to one or more databases.
    • Role: System security officer, system administrator, or database owner
    • Procedure: Run sp_adduser from within the database.
    • See: Security Administration Guide
  3. Add the user to a group in a database.
    • Role: System security officer, system administrator, or database owner
    • Procedure: Run sp_changegroup from within the database.
    • See: Security Administration Guide, and Reference Manual: Commands.
  4. Grant system roles to the user.
    • Role: System security officer, or system administrator
    • Procedure: grant role
    • See: Security Administration Guide, and Reference Manual: Commands.
  5. Create user-defined roles and grant the roles to users.
    • Role: System security officer
    • Procedure: create role, and grant role
    • See: Security Administration Guide, and Reference Manual: Commands.
  6. Grant access to database objects.
    • Role: Database object owner
    • Procedure:

      grant [select | insert | delete | update| references | execute ]

    • See: Security Administration Guide