Outro artigo rápido sobre um problema que tive ontem durante um patch de atualização no ODA. Encontrei um erro durante a aplicação do patch no binário do Oracle.
[Sep 14, 2020 2:40:58 PM] [INFO] add CopyAction for olsrelod.sql [Sep 14, 2020 2:40:58 PM] [INFO] OPatchSessionHelper::sortOnOverlay() Given list - 25897615 25034396 26477255 20370037 21688501 18430870 27435440 24425998 [Sep 14, 2020 2:40:58 PM] [INFO] size of PatchObject list: 8 [Sep 14, 2020 2:40:59 PM] [INFO] Patch 24425998: Achive Action: Directory "/u01/app/oracle/product/12.1.0.2/dbhome_3/.patch_storage/24425998_Sep_28_2016_12_31_24" does not exists or is not readable. 'oracle.rdbms, 12.1.0.2.0': Cannot update file '/u01/app/oracle/product/12.1.0.2/dbhome_3/lib/libserver12.a' with '/ksfd.o' [Sep 14, 2020 2:40:59 PM] [INFO] Prerequisite check "CheckRollbackable" on auto-rollback patches failed. The details are: Patch 24425998: Achive Action: Directory "/u01/app/oracle/product/12.1.0.2/dbhome_3/.patch_storage/24425998_Sep_28_2016_12_31_24" does not exists or is not readable. 'oracle.rdbms, 12.1.0.2.0': Cannot update file '/u01/app/oracle/product/12.1.0.2/dbhome_3/lib/libserver12.a' with '/ksfd.o' [Sep 14, 2020 2:40:59 PM] [SEVERE] OUI-67073:UtilSession failed: Prerequisite check "CheckRollbackable" on auto-rollback patches failed. [Sep 14, 2020 2:40:59 PM] [INFO] -------------------------------------------------------------------------------- [Sep 14, 2020 2:40:59 PM] [INFO] The following warnings have occurred during OPatch execution: [Sep 14, 2020 2:40:59 PM] [INFO] 1) OUI-67303: Patches [ 25897615 25034396 26477255 20370037 21688501 18430870 27435440 24425998 ] will be rolled back. [Sep 14, 2020 2:40:59 PM] [INFO] 2) OUI-67303: Patches [ 25897615 25034396 26477255 20370037 21688501 18430870 27435440 24425998 ] will be rolled back. [Sep 14, 2020 2:40:59 PM] [INFO] -------------------------------------------------------------------------------- [Sep 14, 2020 2:40:59 PM] [INFO] Finishing UtilSession at Mon Sep 14 14:40:59 CEST 2020 [Sep 14, 2020 2:40:59 PM] [INFO] Log file location: /u01/app/oracle/product/12.1.0.2/dbhome_3/cfgtoollogs/opatchauto/core/opatch/opatch2020-09-14_14-39-20PM_1.log
De acordo com o documento: opatch fails with Error: ‘Archive Action: Source file “$ ORACLE_HOME / .patch_storage / …” does not exist.’ or ‘Achive Action: Directory “$ ORACLE_HOME / .patch_storage / …” does not exist or is not readable’. (Doc ID 1244414.1)
O razão do problema é :
Files needed to rollback existing subset patch (es) are missing from $ORACLE_HOME/.patch_storage.
BACKGROUND
When an Oracle software patch is installed, the first step is to place an unmodified copy of each affected $ORACLE_HOME file into a directory under the “$ORACLE_HOME/.patch_storage”. These file copies will be used if the software patch is ever manually, or automatically rolled back.
Bem depois de ver esse erro, fui verificar e ter a certeza de que nada havia sido removido antes do patch.
As únicas soluções suportadas são:
1. The missing directories and files can be restored from a backup of the ORACLE_HOME.
2. If no backups exist then re-install the $ORACLE_HOME.
3. Clone from another ORACLE_HOME of a like installation.
No meu caso, sempre tenho o backup dos seguintes diretórios $ ORACLE_HOME/inventory/oneoffs e $ORACLE_HOME/.patch_storage.
Eu encontrei a pasta do patch /.patch_storage/24425998_Sep_28_2016_12_31_24 que era necessário para realizar o rollback e depois disso o patch foi aplicado com sucesso.
2020-09-15 07:47:04 Patch 29972716 is successfully already applied on the Home: /u01/app/oracle/product/12.1.0.2/db_home3
2020-09-15 07:47:04 SUCCESS: Successfully applied the patch on the Home : /u01/app/oracle/product/12.1.0.2/db_home4, /u01/app/oracle/product/12.1.0.2/db_home1, /u01/app/oracle/product/12.1.0.2/db_home3.
Espero que isso ajude vocês!!!
Fique ligado, acompanhando no twitter @aontalba e no Linkedin