Oracle Schema Privileges

Check Privileges

With Grant option:

Only for object privileges, not system privileges.

With Admin option:

Only for system privileges, not object privileges.

–Check from Current User

select * from USER_ROLE_PRIVS where USERNAME='&&1';
select * from USER_TAB_PRIVS where Grantee = '&&1';
select * from USER_SYS_PRIVS where USERNAME = '&&1';

–Check from sys user
select privilege from dba_sys_privs where grantee=’&&1′;
select privilege from dba_tab_privs where grantee=’&&1′;
select GRANTED_ROLE from dba_role_privs where grantee=’&&1′;


set heading off
set pages 0
set long 9999999
select dbms_metadata.get_granted_ddl('ROLE_GRANT', '&&1')  from dual
select dbms_metadata.get_granted_ddl('SYSTEM_GRANT','&&1')  from dual
select dbms_metadata.get_granted_ddl('OBJECT_GRANT', '&&1')  from dual;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.