Script for generate policy DDL in UNIFIED AUDIT POLICES

Script for generate policy DDL in UNIFIED AUDIT POLICES


set serveroutput on
set long 20000
Declare
Begin
for policy_rec in (select unique policy_name from AUDIT_UNIFIED_POLICIES)
where policy_name not in ('ORA_ACCOUNT_MGMT','ORA_DATABASE_PARAMETER','ORA_SECURECONFIG',
'ORA_DV_AUDPOL','ORA_DV_AUDPOL2','ORA_RAS_POLICY_MGMT','ORA_RAS_SESSION_MGMT','ORA_LOGON_FAILURES',
'ORA_STIG_RECOMMENDATIONS','ORA_LOGON_LOGOFF','ORA_ALL_TOPLEVEL_ACTIONS','ORA_CIS_RECOMMENDATIONS')order by policy_name)
loop

dbms_output.put_line('POLICY_NAME '|| policy_rec.policy_name);
dbms_output.put_line('----------------------------------------');
DBMS_METADATA.GET_DDL('AUDIT_POLICY',policy_rec.policy_name);

end loop;
end;
/

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.