how to find dba_obj_privs query
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.
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 :
0