This content has been marked as final. Show 5 replies
use the following objects to query for the privileges...
select * from session_privs;
Edited by: user3266490 on May 26, 2009 12:31 AM
Welcome to Oracle world and Forum. This is your first post; so i wish to suggest you to next time start your question like:1 person found this helpful
everytime to get the fast and right answers.
select table_name from dict where table_name like '%PRIVS%';
We can get any view by replacing "PRIVS" as per our need and then query those views by joining etc.
The most commonly used views for checking privileges are
In Oracle 10.2.0.1, DBMS_METADATA EXECUTE privilege is granted to PUBLIC.
So you can use following script to get privileges of current user:
SQL statement fail if there is no privilege for the requested category.
set heading off set pages 0 set long 9999999 select dbms_metadata.get_granted_ddl('ROLE_GRANT', user) from dual; select dbms_metadata.get_granted_ddl('SYSTEM_GRANT', user) from dual; select dbms_metadata.get_granted_ddl('OBJECT_GRANT', user) from dual;
This script does not detail privileges granted through a role and it does not report privileges granted to PUBLIC.
Edited by: P. Forstmann on May 26, 2009 11:39 AM