Oracle patching issues
Before starting Patching
-- Take Backup
-- Run pre check
-- Take Backup
-- Run pre check
-- run analyze -- [root@node1 ~]$ opatchauto apply /u01/patches/30501910 -analyze
-- run lsinventory first if new opatch
-- run lsinventory first if new opatch
-- run conflict check first
-- check invalid objects
After Patching
-- run post checks to check inventory details and invalid objects
Frequent solutions used
1) Change permissions to 660
[root@rac01]# find /u01/app/19.8.0/grid_1 -user root -exec chown grid {} \;
2) root@racdbnode02~ # opatchauto resume
3) opatch -rollback -id
Ways to improve patching speed
-switchGridHome) to minimize active downtime. [1, 2]tune_setting with distributed upgrade = true to spread PDB upgrades across multiple cluster nodes in parallel. [1]
ORA-20001 and ORA-20008
Queryable Patch Inventory - Issues/Solutions for ORA-20001: Latest xml inventory is not loaded into table (Doc ID 1602089.1)
verify_queryable_inventory returned ORA-20001: Latest xml inventory is not loaded into table
select dbms_sqlpatch.verify_queryable_inventory from dual;
VERIFY_QUERYABLE_INVENTORY
--------------------------------------------------------------------------------
ORA-20001: Latest xml inventory is not loaded into table
alter system set "_bug27355984_xt_preproc_timeout"=1000 scope=spfile ;
alter system set "_enable_ptime_update_for_sys"=TRUE scope=spfile ;
After patching :
alter system reset "_bug27355984_xt_preproc_timeout" scope=spfile ;
alter system reset "_enable_ptime_update_for_sys" scope=spfile ;
or
Database administrators can successfully resolve the Oracle 19c datapatch ORA-20001 error, which signals an incomplete patch application, by modifying the qopiprep.bat script’s shell interpreter and then re-running the datapatch utility.
- The appearance of
ORA-20001: Latest XML inventory is not loaded into the tableindicates that a recent patch was likely applied to the binaries, but the required SQL changes viadatapatcheither failed or were skipped during execution. - The first step in fixing the issue requires backing up the relevant script by copying it
$ORACLE_HOME/QOpatch/qopiprep.battoqopiprep.bat_bkp. - To resolve the script failure, modify the
qopiprep.batfile by changing the shell interpreter line from#!/bin/shto#!/usr/bin/ksh. - After modifying the script, execute the
./datapatch -verbosecommand from$ORACLE_HOME/OPatch, and confirm success using thedbms_sqlpatch.verify_queryable_inventoryquery.
Similarly if ORA-20008: is reported we need use below trace
>> Before patching
SQL: alter session set events '18219841 trace name context forever';
>> After patching
alter session set events '18219841 trace name context off';
1. OPatch Version Mismatch
Error
OPatch version is too old for this patch
or
OPatch version check failed
Cause
Your OPatch version does not meet the minimum requirement of the patch.
Fix
Check current OPatch version:
$ $ORACLE_HOME/OPatch/opatch version
Download latest OPatch from Oracle Support → Patch 6880880.
Replace OPatch directory:
$ mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
$ unzip p6880880*.zip -d $ORACLE_HOME
Recheck:
$ opatch version
2. OPatch Cannot Find OUI Inventory
Error
OUI-67124: Inventory is corrupted
or
lsinventory cannot open Oracle inventory
Cause
The Oracle inventory is misplaced, corrupted, or incorrectly referenced.
Fix
Check inventory location:
$ cat /etc/oraInst.loc
Update correct location:
inventory_loc=/u01/app/oraInventory
inst_group=oinstall
Re-run:
$ opatch lsinventory
If corrupted:
$ opatch lsinventory -detail -invPtrLoc /etc/oraInst.loc
3. Missing Required Privileges
Error
Prerequisite check failed
User does not have required permissions
Cause
OPatch must be run by the correct OS user.
Fix
For database home → run as oracle
For GI home → run as grid
Check permissions:
$ ls -ld $ORACLE_HOME
Correct them if needed:
$ chown -R grid:oinstall $GRID_HOME
4. OPatch Cannot Access Files / Permission Denied
Error
Permission denied accessing file ...
Cause
Incorrect ownership or permissions inside Oracle home.
Fix
$ chown -R oracle:oinstall $ORACLE_HOME
$ chmod -R 775 $ORACLE_HOME
For GI:
$ chown -R grid:oinstall $GRID_HOME
5. Patch Conflict Detected
Error
Patch conflict detected with patch <patch_number>
Cause
Another patch is already applied that conflicts with the new one.
Fix
Check applied patches:
$ opatch lsinventory
If rollback is allowed:
$ opatch rollback -id <conflicting_patch>
Reapply desired patch:
$ opatch apply
If conflict is mandatory → download merged patch from Oracle Support.
6. OUI-67074: Component Dependencies Not Satisfied
Cause
You are trying to apply patch on incomplete or partially installed home.
Fix
Validate home:
$ opatch lsinventory -detail
Relink Oracle binaries:
$ $ORACLE_HOME/bin/relink all
Retry patch.
7. OPatch Failed with Java Errors
Error
Java could not be launched
Cause
Missing Java or corrupted ORACLE_HOME Java directory.
Fix
Ensure Java exists:
$ ls $ORACLE_HOME/jdk/bin/java
If missing → copy from same-version home or reinstall OPatch.
8. GI Patching – CRS-1705 / Resources Must Be Stopped
Error
CRS-1705: Resource is not offline
Cause
Required cluster resources are still online.
Fix
Put cluster in correct state:
$ grid_home/bin/crsctl stop crs
or
$ grid_home/bin/crsctl stop cluster -all
Use:
$ opatchauto apply <patch>
9. OPatch Fails with “Out of Space”
Error
No space left on device
Fix
Check filesystem:
$ df -h
Clear temp:
$ rm -rf /tmp/*
$ rm -rf /u01/app/oracle/product/patch_backups/*
Comments
Post a Comment