Oracle Database - Grant

> Database > Oracle Database

1 - About

2 - Management

2.1 - List

The grants are stored in view that have the privs suffix (Privileges).

SELECT * FROM all_objects WHERE object_name LIKE '%PRIV%';

The most important is the table (dba|user)_tab_privs. It shows the privileges of the following type:

  • SEQUENCE
  • PACKAGE
  • USER
  • TABLE
  • VIEW
Advertising

2.1.1 - Direct Indirect

Example:

  • Direct Grant on Table
SELECT * FROM table_privileges;
  • Through a role:
SELECT 
    owner, 
    TABLE_NAME,
    PRIVILEGE 
FROM 
    dba_role_privs rp 
    INNER JOIN role_tab_privs rtp ON (rp.granted_role = rtp.role);

2.2 - Grantee

  • USER Name
  • PUBLIC

3 - Documentation / Reference