dataiotech Labs
Scripts Library/oracle/#65
Script #65
oracle
Maintenanceread-onlyMin Version: 10g

Find Invalid Objects in Oracle

Lists INVALID objects in user schemas. Essential after upgrades and patching.

#invalid-objects#compile#post-upgrade
oracle · sql
SELECT owner, object_type, object_name, status, last_ddl_time
FROM   dba_objects
WHERE  status = 'INVALID'
  AND  owner NOT IN ('SYS','SYSTEM')
ORDER  BY owner, object_type, object_name;
Operational Notes & Remediation Guidance

Recompile invalid objects with `ALTER [OBJECT_TYPE] [OBJECT_NAME] COMPILE;` or run `utlrp.sql`.

Production Safety & Execution Standards
  • This script is designed for read-only diagnostics; it does not alter schema or modify data directly.
  • Prior to executing on production systems under high load, verify the target database version (Min. Version: 10g).
  • Exercise caution with mutating actions (e.g., terminating sessions or dropping indexes) referenced in the notes section.

Engineering Triad: Related Runbooks & Incident Response

Which production incidents and emergency drills execute this script as a diagnosis step?

Runbook Library (63)
Proactive Maintenance & Health Check: This script is not tied to an active incident alert; it is intended for scheduled maintenance, capacity planning, and routine DBA audits.