General procedure for adding logins

Follow the general procedure described in Table 5-4 to add logins to the server and, optionally, to add users with appropriate roles and authorizations to one or more databases.

Table 5-4: Adding logins and authorizing database access

Task

Required role

Command or procedure

See

1. Add a login for the user.

System security officer

create login

“Creating login accounts”

2. Add the user to one or more databases.

System administrator or Database owner

sp_adduser – execute this procedure from within the database.

“Adding users to databases”

3. Add the user to a group in a database.

System administrator or Database owner

sp_changegroup – execute this procedure from within the database.

4. Grant system roles to the user.

System administrator or system security officer

grant role

5. Create user-defined roles and grant the roles to users.

System security officer

create role

grant role

6. Grant access to database objects.

Database object owners

Chapter 6, “Managing User Permissions”