meta données pour cette page
Ceci est une ancienne révision du document !
Download Patch
Apply Patch
- faire un backup ORACLE_HOME via un ZIP ou TAR
[oracle@oracle1 tmp]$ tar -cvf ORACLE_HOME_19.4.tar $ORACLE_HOME/
Modifier les droits du patch [root@oracle1 tmp]# chown oracle:oinstall /tmp/p36233263_192300_Linux-x86-64.zip
- Décompresser le Patch
[oracle@oracle1 ]$ cd /tmp [oracle@oracle1 OPatch]$ unzip /tmp/p36233263_192300_Linux-x86-64.zip
- Appliquer le Patch
[oracle@oracle1 36233263]$ unzip /tmp/p36233263_192300_Linux-x86-64.zip [oracle@oracle1 ]$ cd /tmp/36233263 [oracle@oracle1 36233263]$ $ORACLE_HOME/OPatch/opatch apply Programme d'installation des patches temporaires Oracle version 12.2.0.1.43 Copyright (c) 2024, Oracle Corporation. Tous droits réservés. Répertoire de base Oracle : /u01/app/oracle/product/19.0.0/dbhome_1 Inventaire central : /u01/app/oraInventory à partir de : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc Version d'OPatch : 12.2.0.1.43 Version d'OUI : 12.2.0.7.0 Emplacement du fichier journal : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2024-10-12_16-49-38PM_1.log Verifying environment and performing prerequisite checks... OPatch continues with these patches: 36233263 Voulez-vous continuer ? [y|n] y User Responded with: Y All checks passed. Arrêtez les instances Oracle exécutées depuis ce répertoire de base ORACLE_HOME sur le système local. (Répertoire de base Oracle = '/u01/app/oracle/product/19.0.0/dbhome_1') Le système local est-il prêt pour l'application du patch ? [y|n] y User Responded with: Y Backing up files... [...] Application d'un patch au composant oracle.precomp.lang, 19.0.0.0.0... Application d'un patch au composant oracle.jdk, 1.8.0.201.0... Patch 36233263 successfully applied. Sub-set patch [29517242] has become inactive due to the application of a super-set patch [36233263]. Please refer to Doc ID 2161861.1 for any possible further required actions. Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2024-10-12_16-49-38PM_1.log OPatch succeeded.
- Vérification classique
[oracle@oracle1 36233263]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Sat Oct 12 17:02:22 2024 Version 19.23.0.0.0 Copyright (c) 1982, 2023, Oracle. All rights reserved. Connected to an idle instance. SQL>
- Vérification avec OPatch
[oracle@oracle1 36233263]$ cd $ORACLE_HOME/ [oracle@oracle1 dbhome_1]$ [oracle@oracle1 dbhome_1]$ cd OPatch/ [oracle@oracle1 OPatch]$ ./op opatch opatchauto opatchauto.cmd opatch.bat opatch_env.sh opatchprereqs/ operr operr.bat oplan/ [oracle@oracle1 OPatch]$ ./opatch lsinventory Programme d'installation des patches temporaires Oracle version 12.2.0.1.43 Copyright (c) 2024, Oracle Corporation. Tous droits réservés. Répertoire de base Oracle : /u01/app/oracle/product/19.0.0/dbhome_1 Inventaire central : /u01/app/oraInventory à partir de : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc Version d'OPatch : 12.2.0.1.43 Version d'OUI : 12.2.0.7.0 Emplacement du fichier journal : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2024-10-12_17-03-50PM_1.log Lsinventory Output file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2024-10-12_17-03-50PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: oracle1.labo.local ARU platform id: 226 ARU platform description:: Linux x86-64 Produits de niveau supérieur installés (1) : Oracle Database 19c 19.0.0.0.0 1 produits sont installés dans ce répertoire de base Oracle. Patches temporaires (2) : Patch 36233263 : applied on Sat Oct 12 16:53:27 EDT 2024 Unique Patch ID: 25638263 Patch description: "Database Release Update : 19.23.0.0.240416 (36233263)" Created on 8 Apr 2024, 17:16:56 hrs UTC Bugs fixed: 10121473, 10123661, 1297945, 14570574, 14735102, 15931756, 15959416 [...] -------------------------------------------------------------------------------- OPatch succeeded.
PROBLEME
- PDB blockée en OPEN RESTRICTED:
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 OEMDB135 READ WRITE YES SQL> SELECT status, message, action FROM pdb_plug_in_violations WHERE status !='RESOLVED'; STATUS --------- MESSAGE -------------------------------------------------------------------------------- ACTION -------------------------------------------------------------------------------- PENDING '19.23.0.0.0 Release_Update 2404060042' IS installed IN the CDB but '19.19.0.0.0 Release_Update 2303220204' IS installed IN the PDB Call datapatch TO install IN the PDB OR the CDB
⇒ relancer datapatch et redémarrer l'instance:
$ORACLE_HOME/OPatch/datapatch
SQL Patching tool version 19.23.0.0.0 Production on Fri Dec 6 17:17:25 2024
Copyright (c) 2012, 2024, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_16777_2024_12_06_17_17_25/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
[...]
Installing patches...
Patch installation complete. Total patches installed: 1
Validating logfiles...done
Patch 36233263 apply (pdb OEMDB135): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/36233263/25638263/36233263_apply_OEMDB_OEMDB135_2024Dec06_17_18_12.log (no errors)
SQL Patching tool complete on Fri Dec 6 17:18:48 2024
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1.7180E+10 bytes
Fixed Size 9223416 bytes
Variable Size 1.5636E+10 bytes
Database Buffers 1526726656 bytes
Redo Buffers 7553024 bytes
Database mounted.
Database opened.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 OEMDB135 READ WRITE NO
SQL> select status, message, action
from pdb_plug_in_violations
where status !='RESOLVED'; 2 3
no rows selected