Introduction to Database Security
Database security entails allowing or disallowing user actions on the
database and the objects within it. Oracle uses schemas and security
domains to control access to data and to restrict the use of various database
resources.
Database Users and Schemas
Each Oracle database has a list of user names. To access a database, a user
must use a database application and attempt a connection with a valid user
name of the database. Each user name has an associated password to
prevent unauthorized use.
Security Domain
Each user has a security domain—a set of properties that determine such
things as:
The actions (privileges and roles) available to the user
The tablespace quotas (available disk space) for the user
The system resource limits (for example, CPU processing time) for the
user
Each property that contributes to a user's security domain is discussed in the
following sections.
Privileges
A privilege is a right to run a particular type of SQL statement. Some
examples of privileges include the right to:
Connect to the database (create a session)
Create a table in your schema
Select rows from someone else's table
Run someone else's stored procedure
Roles
Oracle provides for easy and controlled privilege management through
roles. Roles are named groups of related privileges that you grant to users
or other roles.
To see which table privileges are granted by you to other users.
SQL>SELECT * FROM USER_TAB_PRIVS_MADE
To see which table privileges are granted to you by other users
SQL>SELECT * FROM USER_TAB_PRIVS_RECD;
To see which column level privileges are granted by you to other users.
SQL>SELECT * FROM USER_COL_PRIVS_MADE;
To see which column level privileges are granted to you by other users
SQL>SELECT * FROM USER_COL_PRIVS_RECD;
To see which privileges are granted to roles
SQL>SELECT * FROM USER_ROLE_PRIVS;