Oracle Database 11g Upgrade to 19c – Error: ORA-00904

I was running an Oracle Database Upgrade of version 11.2.0.4 to 19c (patched up to 19.15) using the DBUA.

While running the upgrade, the log showed the below errors:

ORA-00904: «CURRENT_USER»: invalid identifier
and
ORA-00904: «RLS_INFO»: invalid identifier

After a lot of searching online and in the metalink (Doc ID 2557794.1), I found that the columns are missing because AUD$ did not get upgraded at some point, so AUD$ is missing these needed columns.

This was blocking the compilation and therefore the upgrade failed.

As a next step, I reverted back the database to the restore point I had taken.

The solution for this specific issue that I followed was:
1)Connect as SYSDBA

2)Run the below to create the missing columns in the audit trail:
alter table system.aud$ add RLS$INFO CLOB;
alter table system.aud$ add CURRENT_USER VARCHAR2(128);

3)Recreate the audit trail views:
@$ORACLE_HOME/rdbms/admin/cataudit.sql

4)Recompile invalid objects:
@?/rdbms/admin/utlrp.sql

5)Check that there are no SYS or SYSTEM invalid objects

(Oracle also proposes to recreate the DBMS_AUDIT_UTIL package. But in the specific version the dbmsaudutl.sql and dbmsaudutl.sql are not available)


Written by Nikos Minaidis
20/07/2022

Σχολιάστε