← Patching & Upgrade
Oracle · Patching & Upgrade

How to find and recompile invalid objects after patching in Oracle

Find invalid objects after a patch or upgrade from DBA_OBJECTS and recompile them with utlrp or UTL_RECOMP.

Tested on11g12c18c19c21c23ai26ai

After patching or upgrading, find invalid objects and recompile them.

Running utlrp recompiles invalid objects across the whole database. It is a standard post-patch step, but run it in a quiet window on busy systems.

-- Find invalid objects
SELECT owner, object_name, object_type, status
FROM   dba_objects
WHERE  status = 'INVALID'
ORDER  BY owner, object_type, object_name;

-- Recompile everything invalid (run as SYSDBA)
-- @?/rdbms/admin/utlrp.sql

-- Or recompile in parallel via the package
-- EXEC UTL_RECOMP.RECOMP_PARALLEL(4);
PatchingUpgradeInvalid Objects