Want to post your scripts here in this blog ? Email it to snojha@gmail.com. You will be rewarded for your scripts if selected by our experts.

Wednesday, January 13, 2010

Check for Unauthorized Object Owner

select distinct owner from dba_objects
where owner not in
('SYS','SYSTEM','MDSYS','CTXSYS',
'ORDSYS','ORDPLUGINS','AURORA$JIS$UTILITY$',
'HR','ODM','ODM_MTR','OE','OLAPDBA','OLAPSYS',
'OSE$HTTP$ADMIN','OUTLN','LBACSYS','MTSYS',
'PM','PUBLIC','QS','QS_ADM','QS_CB','QS_CBADM', 'DBSNMP',
'QS_CS','QS_ES','QS_OS','QS_WS','RMAN','SH','WKSYS',
'WMSYS','XDB')
and owner not in (select grantee from dba_role_privs where granted_role='DBA');

No comments: