A full description of the syntax used in the SQL statements regarding authorization is provided under Authorization in the Reference Manual. You should also refer to the user concept of the database system.
The database system administrator is generated when you create a database instance. This database system administrator can then create further database users as well as database administrators. All database administrators can create database users, combine these in database user groups, and assign privileges. You can control access to the data in the database for specific users.
The following section uses examples to explain a few of the key SQL statements for authorization.
You need the HOTELDB_SIMPLE version of the model database HOTELDB.
Start the SQL Studio query tool as the database administrator MONA with the password RED.
If the HOTELDB database was created with the default values, the database system administrator has the name DBA and password DBA.
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 CREATE USER keywords and the password (RED) after the PASSWORD keyword.
· The user class DBA (database administrator) is assigned to database user MONA.
· The NOT EXCLUSIVE option specifies that the database administrator MONA can open several database sessions at once.
In the HOTELDB model database, the HOTEL schema belongs to database user MONA. This schema contains the tables city, customer, hotel, room, and reservation, as well as any further database objects created by database administrator MONA: indexes, database procedures, view tables, and so on.
· Database Users and Their Privileges
· Roles