My colleagues enhanced Datapatch so it can check your Oracle AI Database and see if it’s prone to errors we’ve seen at other customers.
This check is called a Datapatch Sanity Check.
It is a lightweight and non-intrusive check that scans an Oracle AI Database and produces a report with findings.
How to Run a Sanity Check
- Before patching, assess the patching readiness of your Oracle AI Database:
export ORACLE_SID=ORCL cd $ORACLE_HOME/OPatch ./datapatch -sanity_checks- You can run the check on an active database.
- The check scans the operating system, database and all open PDBs.
- Datapatch prints the report on the screen. Examine it:
SQL Patching sanity checks version 19.27.0.0.0 on Fri 12 Jun 2026 03:25:42 PM GMT Copyright (c) 2021, 2026, Oracle. All rights reserved. Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20260612_152542_17281/sanity_checks_20260612_152542_17281.log Running checks JSON report generated in /u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20260612_152542_17281/sqlpatch_sanity_checks_summary.json file Checks completed. Printing report: Check: Database component status - OK Check: PDB Violations - OK Check: Invalid System Objects - OK Check: Tablespace Status - OK Check: Backup jobs - OK Check: Temp file exists - OK Check: Temp file online - OK Check: Data Pump running - OK Check: Container status - OK Check: Oracle Database Keystore - OK Check: Dictionary statistics gathering - OK Check: Scheduled Jobs - OK Check: GoldenGate triggers - OK Check: Logminer DDL triggers - OK Check: Check sys public grants - OK Check: Statistics gathering running - OK Check: Optim dictionary upgrade parameter - OK Check: Symlinks on oracle home path - OK Check: Central Inventory - OK Check: Queryable Inventory dba directories - OK Check: Queryable Inventory locks - OK Check: Queryable Inventory package - OK Check: Queryable Inventory external table - OK Check: Imperva processes - OK Check: Guardium processes - OK Check: Locale - OK Refer to MOS Note 2975965.1 and debug log /u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20260612_152542_17281/sanity_checks_debug_20260612_152542_17281.log SQL Patching sanity checks completed on Fri 12 Jun 2026 03:26:18 PM GMT- All checks passed.
Usage Notes
-
The checks may give the following result:
- OK
- WARNING
- ERROR
-
Datapatch exit codes:
- 0 – All checks passed
- 1 – Errors found
- 2 – Warnings found
-
If the database is an Oracle RAC Database, Datapatch also connects to the other nodes to conduct scanning. This requires passwordless SSH between the nodes.
-
The Sanity Check doesn’t check whether patches need to be applied or not. To determine whether patches need to be installed in the database, use:
./datapatch -prereq
That’s It
Checking your database upfront will help you avoid some of the common pitfalls when installing patches.
Happy patching!
Further Reading
- My Oracle Support, Datapatch – Sanity Checks Reference (KB129621)
- My Oracle Support, Datapatch User Guide (KB123801)
- My Oracle Support, Datapatch: Database 12c or later Post Patch SQL Automation (KB148594)