Thursday, July 14, 2011

What are Privileges?

A privilege is a right to execute a particular type of SQL statement

Types of Privileges:

System privileges

Object privileges

System privileges:

A system privilege allows a user to perform a particular database operation or class of database operations.

Select name from system_privilege_map;


It controls restrictions on system privileges. The default for O7_DICTIONARY_ACCESSIBILITY is FALSE.  If the parameter is set to TRUE, access to objects in the SYS schema is allowed.
When this parameter is not set to FALSE, the ANY privilege applies to the data dictionary, and a malicious user with ANY privilege could access or alter data dictionary tables.

Object privileges:

Privileges can be assigned to the following types of database objects:
·         Tables
select, insert, update, delete, alter, debug, flashback, on commit refresh, query rewrite, references, all
·         Views
select, insert, update, delete, under, references, flashback, debug
·         Sequence
alter, select
·         Packages, Procedures, Functions (Java classes, sources...)
execute, debug
·         Materialized Views
delete, flashback, insert, select, update
·         Directories
read, write
·         Libraries
·         User defined types
execute, debug, under
·         Operators
·         Indextypes