meta données pour cette page
  •  

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
oracle:opatch:apply_patch [12/10/2024 20:50] mdloracle:opatch:apply_patch [13/11/2025 08:16] (Version actuelle) mdl
Ligne 1: Ligne 1:
-== Apply Patch ==+====== Patch ORACLE_HOME ====== 
 + 
 + 
 + 
 + 
 +== Download Patch == 
 + 
 +[[https://support.oracle.com/epmos/faces/PatchResultsNDetails?_adf.ctrl-state=mxne3pp6u_4&releaseId=600000000101150&requestId=25638263&patchId=36233263&languageId=0&platformId=226&searchdata=%3Ccontext+type%3D%22BASIC%22+search%3D%22%26lt%3BSearch%26gt%3B%26lt%3BFilter+name%3D%26quot%3Bpatch_number%26quot%3B+op%3D%26quot%3Bis%26quot%3B+value%3D%26quot%3B36233263%26quot%3B%2F%26gt%3B%26lt%3BFilter+name%3D%26quot%3Bexclude_superseded%26quot%3B+op%3D%26quot%3Bis%26quot%3B+value%3D%26quot%3Bfalse%26quot%3B%2F%26gt%3B%26lt%3B%2FSearch%26gt%3B%22%2F%3E&_afrLoop=381051573684953]] 
 + 
 + 
 + 
 +== 1/ Update Opatch == 
 + 
 +  
 +https://updates.oracle.com/download/6880880.html 
 +<code bash> 
 +[oracle@oracle1]$ cd $ORACLE_HOME/ 
 +[oracle@oracle1 dbhome_1]$ cd OPatch/ 
 + 
 +[oracle@oracle1 OPatch]$ ./opatch version 
 +OPatch Version: 12.2.0.1.17 
 + 
 +OPatch succeeded. 
 + 
 + 
 +[oracle@oracle1 OPatch]$ cd .. 
 +[oracle@oracle1 dbhome_1]$  rm OPatch/ -Rf 
 +[oracle@oracle1 dbhome_1]$  unzip /tmp/p6880880_OPatch12.2.0.1.43_190000_Linux-x86-64.zip 
 + 
 +[oracle@oracle1 dbhome_1]$ cd OPatch/ 
 + 
 +[oracle@oracle1 OPatch]$ ./opatch version 
 +OPatch Version: 12.2.0.1.43 
 + 
 +OPatch succeeded. 
 + 
 + 
 +</code> 
 + 
 + 
 +== 2/ Apply Patch ==
   * faire un backup ORACLE_HOME via un ZIP ou TAR   * faire un backup ORACLE_HOME via un ZIP ou TAR
 <code bash> <code bash>
Ligne 48: Ligne 88:
 Backing up files... 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.
  
 </code> </code>
  
 +  * Vérification classique
 +<code bash>
 +[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>
 +</code>
 +
 +  * Vérification avec OPatch
 +<code bash>
 +[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.
 +
 +</code>
 +
 + \\
 +
 +== PROBLEME ==
 +  * PDB blockée en OPEN RESTRICTED: 
 +<code PLSQL>
 +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
 +
 +</code>
 +=> relancer datapatch et redémarrer l'instance:
 +<code >
 +$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
 +
 +
 +</code>