Follow the general procedure described in Table 14-6 to add logins to the server and, optionally, to add users to one or more databases with appropriate roles and authorizations to one or more databases.
Task |
Required role |
Command or procedure |
See |
---|---|---|---|
1. Add a login for the user. |
System Security Officer |
sp_addlogin |
|
2. Add the user to one or more databases. |
System Administrator or Database Owner |
sp_adduser – execute this procedure from within the database. |
|
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 |