For a complete syntax description of the SQL statements for authorization, see Authorization in the SQL reference manual. Find out about the user concept of the database system (Managing Users).
The database system administrator is generated when a database is created. The database system administrator can generate additional database users, including database administrators. All database administrators can create database users and grant privileges. This enables you to control data access for each individual user. Below are just a few examples of key SQL statements for authorization.
You can use the demo data for the SQL tutorial. Start the Database Studio as database administrator MONA with the password RED and log on to demo database DEMODB: Logging On to a Database.
If the DEMODB database was created with the default values, the database system administrator has the name DBADMIN and password SECRET. The database user MONA was created with the following CREATE USER statement:
CREATE USER mona PASSWORD red DBA NOT EXCLUSIVE
The name of the database user (MONA) is specified after the keywords CREATE USER and the password (RED) after the keyword PASSWORD.
The user class DBA (Database Administrator) is defined for the database user MONA.
NOT EXCLUSIVE specifies that the database administrator MONA is permitted to open several database sessions at the same time.
In the DEMODB database, the HOTEL demo schema belongs to database administrator MONA. The HOTEL schema contains the tables CITY, CUSTOMER, HOTEL, ROOM, RESERVATION as well as other database objects created by database administrator MONA, if any: indexes, database procedures, View tables, etc.