To add logins to the server and, optionally, to add users with appropriate roles and authorization to one or more databases, follow the general procedure described in Table 8-4.
Task |
Required role |
Command or procedure |
See |
---|---|---|---|
1. Add a login for the user. |
System Security Officer |
sp_addlogin |
The System Administration Guide |
2. Add the user to one or more databases. |
System Security Officer, System Administrator, or Database Owner |
sp_adduser Enter this procedure from within the database. |
The System Administration Guide |
3. Add the user to a group in a database. |
System Security Officer, System Administrator, or Database Owner |
sp_changegroup Enter this procedure from within the database. |
The System Administration Guide sp_changegroup in the Adaptive Server Reference Manual |
4. Grant system roles to the user. |
System Administrator or System Security Officer |
grant role |
The System Administration Guide grant in the Adaptive Server Reference Manual |
5. Create user-defined roles and grant the roles to users. |
System Security Officer |
create role grant role |
The System Administration Guide grant role in the Adaptive Server Reference Manual create role in the Adaptive Server Reference Manual |
6. Grant access to database objects. |
Database object owner |
grant [select | insert| delete| update| references | execute] |
The System Administration Guide |