Forum Stats

  • 3,839,329 Users
  • 2,262,481 Discussions
  • 7,900,934 Comments

Discussions

Can't downgrade because unified audit trail can't be completely purged

User51642 Yong Huang
User51642 Yong Huang Member Posts: 166 Bronze Badge

Has anybody successfully downgraded from 19c to 18c? I tried on two freshly created 19c sandbox databases. Both failed due to this error shown in $ORACLE_HOME/cfgtoollogs/downgrade/catdwgrd1.log

ORA-20001: Downgrade cannot proceed - Unified Audit Trail data exists.Please
clean up the data first using DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL.
ORA-06512: at line 75
ORA-06512: at line 52

According to

or Doc 2351440.1, I need to run

exec DBMS_AUDIT_MGMT.clean_audit_trail(audit_trail_type=>DBMS_AUDIT_MGMT.AUDIT_TRAIL_ALL,use_last_arch_timestamp=>FALSE)

But it does not completely purge the records as shown in unified_audit_trail.

According to Doc 1944147.1, I have to manually delete the spill over audit files, $ORACLE_BASE/audit/$ORACLE_SID/*.bin. But the unified_audit_trail view still has 1 row.

Worse, in pdb$seed, I can't even run DBMS_AUDIT_MGMT.clean_audit_trail due to

ORA-04063: package body "AUDSYS.DBMS_AUDIT_MGMT" has errors
ORA-06508: PL/SQL: could not find program unit being called: "AUDSYS.DBMS_AUDIT_MGMT"

I'm curious how anybody did the downgrade.