Scenario 5 – Disabling and Deleting Audit Policy

 

In this section, we’ll explore how to disable and delete audit policies in your Oracle database environment without dropping them permanently.

1. Displaying Enabled Audit Policies

Start by displaying the list of enabled audit policies:

SQL> CONNECT / AS SYSDBA
SQL> COL POLICY_NAME FORMAT A20
SQL> SELECT * FROM AUDIT_UNIFIED_ENABLED_POLICIES;

2. Disabling an Audit Policy

Next, disable the AUD_MIXED_POL audit policy:

SQL> NOAUDIT POLICY aud_mixed_pol;
SQL> SELECT * FROM AUDIT_UNIFIED_ENABLED_POLICIES;

3. Dropping an Audit Policy

Attempt to drop the DP_POL audit policy. Note that an audit policy can only be dropped after being disabled:

SQL> DROP AUDIT POLICY dp_pol;

Now, disable the policy and then drop it:

 

SQL> NOAUDIT POLICY dp_pol;
SQL> DROP AUDIT POLICY dp_pol;
SQL> SELECT * FROM AUDIT_UNIFIED_ENABLED_POLICIES;

By following these steps, you can effectively disable and delete audit policies as needed in your Oracle database environment.

Leave a Reply

Your email address will not be published. Required fields are marked *