Database Security Products (MOSC)

MOSC Banner

how to find dba_obj_privs query

edited Aug 27, 2010 3:12AM in Database Security Products (MOSC) 3 commentsAnswered
 Hi,
I have to find the query which gives the privilege on all the objects of databaseschema.  I found the following script at
http://www.oracleforensics.com/wordpress/index.php/2009/07/25/dba_obj_privs/#respond
but it is not correct as object_type column never shows the details about the Materilized views.

<b><font size="3">CREATE OR replace VIEW dba_obj_privs AS select ue.name grantee, u.name owner , o.name object_name, ur.name grantor , tpm.name privilege, <br/> decode(mod(oa.option$,2), 1, 'YES', 'NO') grantable, <br/> decode(bitand(oa.option$,2), 2, 'YES', 'NO') heirarchy, <br/> OBJECT_TYPE <br/> from sys.objauth$ oa, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue, <br/> table_privilege_map tpm, DBA_OBJECTS <br/> where oa.obj# = o.obj# <br/> and oa.grantor# = ur.user# <br/> and oa.grantee# = ue.user# <br/> and oa.col# is null <br/> and oa.privilege# = tpm.privilege <br/> and u.user# = o.owner# <br/> AND DBA_OBJECTS.OBJECT_ID=oa.obj#;</font> </b> <br/> <br/>Note :

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center