For a complete syntax description of the SQL statements for authorization, see Authorization in the reference manual. Find out about the user concept of the database system (User, Authentication and Authorizations).
The database administrator (SYSDBA user) is created when a database instance 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 need the HOTEL Demo Schema for the SQL Tutorial.
To log on to the database instance DEMODB, start the SQL Studio query tool as the database administrator MONA with the password RED.
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 instance, 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