meta données pour cette page
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| oracle:opatch:apply_patch [12/10/2024 20:38] – mdl | oracle:opatch:apply_patch [13/11/2025 08:16] (Version actuelle) – mdl | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | == Apply Patch == | + | ====== Patch ORACLE_HOME ====== |
| + | |||
| + | |||
| + | |||
| + | |||
| + | == Download Patch == | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | == 1/ Update Opatch == | ||
| + | |||
| + | |||
| + | https:// | ||
| + | <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]$ | ||
| + | [oracle@oracle1 dbhome_1]$ | ||
| + | |||
| + | [oracle@oracle1 dbhome_1]$ cd OPatch/ | ||
| + | |||
| + | [oracle@oracle1 OPatch]$ ./opatch version | ||
| + | OPatch Version: 12.2.0.1.43 | ||
| + | |||
| + | OPatch succeeded. | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | == 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> | ||
| [oracle@oracle1 tmp]$ tar -cvf ORACLE_HOME_19.4.tar $ORACLE_HOME/ | [oracle@oracle1 tmp]$ tar -cvf ORACLE_HOME_19.4.tar $ORACLE_HOME/ | ||
| </ | </ | ||
| + | |||
| + | Modifier les droits du patch | ||
| + | [root@oracle1 tmp]# chown oracle: | ||
| * Décompresser le Patch | * Décompresser le Patch | ||
| Ligne 13: | Ligne 56: | ||
| * Appliquer le Patch | * Appliquer le Patch | ||
| <code bash> | <code bash> | ||
| - | [oracle@oracle1 ]$ cd / | ||
| [oracle@oracle1 36233263]$ unzip / | [oracle@oracle1 36233263]$ unzip / | ||
| + | [oracle@oracle1 ]$ cd / | ||
| [oracle@oracle1 36233263]$ $ORACLE_HOME/ | [oracle@oracle1 36233263]$ $ORACLE_HOME/ | ||
| + | |||
| + | Programme d' | ||
| + | Copyright (c) 2024, Oracle Corporation. Tous droits réservés. | ||
| + | |||
| + | |||
| + | Répertoire de base Oracle | ||
| + | Inventaire central : / | ||
| + | à partir de : / | ||
| + | Version d' | ||
| + | Version d' | ||
| + | Emplacement du fichier journal : / | ||
| + | |||
| + | Verifying environment and performing prerequisite checks... | ||
| + | OPatch continues with these patches: | ||
| + | |||
| + | 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 = '/ | ||
| + | |||
| + | |||
| + | Le système local est-il prêt pour l' | ||
| + | y | ||
| + | User Responded with: Y | ||
| + | Backing up files... | ||
| + | |||
| + | [...] | ||
| + | |||
| + | Application d'un patch au composant oracle.precomp.lang, | ||
| + | |||
| + | 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: / | ||
| + | |||
| + | OPatch succeeded. | ||
| + | |||
| </ | </ | ||
| + | |||
| + | * 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. | ||
| + | |||
| + | Connected to an idle instance. | ||
| + | SQL> | ||
| + | </ | ||
| + | |||
| + | * 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 | ||
| + | [oracle@oracle1 OPatch]$ ./opatch lsinventory | ||
| + | Programme d' | ||
| + | Copyright (c) 2024, Oracle Corporation. Tous droits réservés. | ||
| + | |||
| + | |||
| + | Répertoire de base Oracle | ||
| + | Inventaire central : / | ||
| + | à partir de : / | ||
| + | Version d' | ||
| + | Version d' | ||
| + | Emplacement du fichier journal : / | ||
| + | |||
| + | Lsinventory Output file location : / | ||
| + | -------------------------------------------------------------------------------- | ||
| + | Local Machine Information:: | ||
| + | Hostname: oracle1.labo.local | ||
| + | ARU platform id: 226 | ||
| + | ARU platform description:: | ||
| + | |||
| + | 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 | ||
| + | Unique Patch ID: 25638263 | ||
| + | Patch description: | ||
| + | | ||
| + | Bugs fixed: | ||
| + | | ||
| + | [...] | ||
| + | |||
| + | -------------------------------------------------------------------------------- | ||
| + | |||
| + | OPatch succeeded. | ||
| + | |||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | == PROBLEME == | ||
| + | * PDB blockée en OPEN RESTRICTED: | ||
| + | <code PLSQL> | ||
| + | SQL> show pdbs | ||
| + | |||
| + | CON_ID CON_NAME | ||
| + | ---------- ------------------------------ ---------- ---------- | ||
| + | 2 PDB$SEED | ||
| + | 3 OEMDB135 | ||
| + | |||
| + | SQL> select status, message, action | ||
| + | | ||
| + | | ||
| + | |||
| + | STATUS | ||
| + | --------- | ||
| + | MESSAGE | ||
| + | -------------------------------------------------------------------------------- | ||
| + | ACTION | ||
| + | -------------------------------------------------------------------------------- | ||
| + | PENDING | ||
| + | ' | ||
| + | | ||
| + | Call datapatch to install in the PDB or the CDB | ||
| + | |||
| + | </ | ||
| + | => relancer datapatch et redémarrer l' | ||
| + | <code > | ||
| + | $ORACLE_HOME/ | ||
| + | |||
| + | SQL Patching tool version 19.23.0.0.0 Production on Fri Dec 6 17:17:25 2024 | ||
| + | Copyright (c) 2012, 2024, Oracle. | ||
| + | |||
| + | Log file for this invocation: / | ||
| + | |||
| + | Connecting to database...OK | ||
| + | Gathering database info...done | ||
| + | |||
| + | [...] | ||
| + | |||
| + | Installing patches... | ||
| + | Patch installation complete. | ||
| + | |||
| + | Validating logfiles...done | ||
| + | Patch 36233263 apply (pdb OEMDB135): SUCCESS | ||
| + | logfile: / | ||
| + | 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 | ||
| + | Redo Buffers | ||
| + | Database mounted. | ||
| + | Database opened. | ||
| + | SQL> show pdbs | ||
| + | |||
| + | CON_ID CON_NAME | ||
| + | ---------- ------------------------------ ---------- ---------- | ||
| + | 2 PDB$SEED | ||
| + | 3 OEMDB135 | ||
| + | SQL> select status, message, action | ||
| + | | ||
| + | | ||
| + | |||
| + | no rows selected | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||