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 21:01] – 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> | ||
| Ligne 62: | Ligne 102: | ||
| </ | </ | ||
| + | * 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 | ||
| + | |||
| + | |||
| + | </ | ||