REVOKE Statement

Revoke privileges from users or roles.

Syntax:

Roles:
   REVOKE role FROM {user, | role, |PUBLIC}

System Privs:
   REVOKE system_priv(s) FROM {user, | role, |PUBLIC}

Objects:
   REVOKE ALL [(columns)] ON [schema.]object 
         FROM  {user, | role, |PUBLIC} [CASCADE CONSTRAINTS] [FORCE] 

   REVOKE object_priv [(columns)] ON [schema.]object
         FROM  {user, | role, |PUBLIC} [CASCADE CONSTRAINTS] [FORCE]

   REVOKE object_priv [(columns)] ON DIRECTORY directory_name
         FROM  {user, | role, |PUBLIC} [CASCADE CONSTRAINTS] [FORCE]

   REVOKE object_priv [(columns)] ON JAVA [RE]SOURCE [schema.]object
         FROM  {user, | role, |PUBLIC} [CASCADE CONSTRAINTS] [FORCE]

key:
   object_privs
   ALTER, DELETE, EXECUTE, INDEX, INSERT, 
   REFERENCES, SELECT, UPDATE, ALL PRIVILEGES

   system_privs
   ALTER ANY INDEX, BECOME USER, CREATE TABLE, DROP ANY VIEW
   RESTRICTED SESSION, UNLIMITED TABLESPACE, UPDATE ANY TABLE
   plus too many others to list here

   roles
   Standard Oracle roles -  
   CONNECT, RESOURCE, DBA, EXP_FULL_DATABASE, IMP_FULL_DATABASE
   plus any user defined roles you have available

FORCE, will revoke all privileges from a user-defined-type and mark it's dependent objects INVALID.

"The most radical revolutionary will become a conservative the day after the revolution" - Hannah Arendt

Related Commands:

AUDIT
CREATE ROLE
GRANT

Related Views:

 DBA_COL_PRIVS        ALL_COL_PRIVS        USER_COL_PRIVS       COLUMN_PRIVILEGES 
                      ALL_COL_PRIVS_MADE   USER_COL_PRIVS_MADE 
                      ALL_COL_PRIVS_RECD   USER_COL_PRIVS_RECD 

 DBA_ROLE_PRIVS                            USER_ROLE_PRIVS      ROLE_ROLE_PRIVS 

 DBA_SYS_PRIVS                             USER_SYS_PRIVS       ROLE_SYS_PRIVS 
                                                                SESSION_PRIVS 

 DBA_TAB_PRIVS        ALL_TAB_PRIVS        USER_TAB_PRIVS       TABLE_PRIVILEGES 
                                                                ROLE_TAB_PRIVS 
                      ALL_TAB_PRIVS_MADE   USER_TAB_PRIVS_MADE 
                      ALL_TAB_PRIVS_RECD   USER_TAB_PRIVS_RECD 




Back to the Top

Simon Sheppard
SS64.com