ORA-04045: errors during recompilation/revalidation
1 min readMar 21, 2024
Hello everyone, after completing an upgrade operation on the Oracle database, it’s important to execute @$ORACLE_HOME/rdbms/admin/utlrp.sql
script.
This script recompile all invalid objects in the database, provide their compatibility with the new version of the database software.
If you’re experiencing the ORA-04045: error, you can following steps:
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of DBA.LOG_ERRORS_ALL
ORA-01031: insufficient privileges
-- To disable system triggers, set the system triggers parameter to FALSE
-- After completing the process, enable system triggers for database operation
23:00:43 SQL> ALTER SYSTEM SET "_system_trig_enabled" = FALSE scope=both;
System altered.
-- Please rerun the script.
23:00:55 SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
-- See hidden parameters
SQL> SELECT a.ksppinm "Parameter", b.ksppstvl "Session Value", c.ksppstvl "Instance Value"
FROM x$ksppi a, x$ksppcv b, x$ksppsv c
WHERE a.indx = b.indx AND a.indx = c.indx
AND substr(ksppinm,1,1)='_'
AND a.ksppinm LIKE '%_system_trig_enabled%' --enter parameter here
ORDER BY a.ksppinm;
A similar example of the error may be encountered as follows:
ORA-04045: errors during recompilation/revalidation of DBA.DDL_HISTORY
ORA-06512: at "SYS.KUPV$FT", line 1056
ORA-01031: insufficient privileges
ORA-06512: at "SYS.KUPV$FT", line 1044
-- SOLUTION
-- You should run the utlrp.sql script.
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
-- Enable system triggers
23:00:43 SQL> ALTER SYSTEM SET "_system_trig_enabled" = TRUE scope=both;
System altered.
I hope it helped you! If you need further help, feel free to reach out to me on linkedin to contact me.
Best regards!