You must have NO OTHER PATCHES installed on your Oracle Server since the latest patch set
Patching "a lo macho"
Tenemos plena confianza en que todo saldrá bien y aplicamos el patch sin pensarlo mucho y cruzando los dedos, a veces se aplicará sin problemas, otras veces fallará, como en este caso en el que deseamos aplicar el patch 4459936 FGA doesn’t work correctly with ansi outer joins in 10g.
[oracle@caliope 4459936]$ opatch apply
Invoking OPatch 10.2.0.4.5
Oracle Interim Patch Installer version 10.2.0.4.5
Copyright (c) 2008, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.5
OUI version : 10.2.0.4.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2008-12-31_01-11-38AM.log
Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '4459936' to OH '/u01/app/oracle/product/10.2.0/db_1'
Interim Patch 4459936 has Conflict with patch(es) [ 6996030 ] in OH /u01/app/oracle/product/10.2.0/db_1
Conflict patches: 6996030
Patch(es) 6996030 conflict with the patch currently being installed (4459936).
If you continue, patch(es) 6996030 will be rolled back and the new patch (4459936) will be installed.
If a merge of the new patch (4459936) and the conflicting patch(es) ( 6996030) is required, contact Oracle Support Services and request a Merged patch.
Do you want to proceed? [y|n]
Pues ocurre que el nuevo patch entra en conflicto con el patch 6996030 Merge label request on top of 10.2.0.4 for audit trail clean-up, y si deseamos aplicarlo entonces Oracle tendrá que desinstalar el ya existente, algo que usualmente no deseamos hacer, pero mientras tanto perdimos tiempo pues tuvimos que suspender el servicio y posiblemente trabajar en un horario fuera de lo normal.
Patching Planificado
[oracle@caliope 5099019]$ opatch lsinventory
Invoking OPatch 10.2.0.4.5
Oracle Interim Patch Installer version 10.2.0.4.5
Copyright (c) 2008, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.5
OUI version : 10.2.0.4.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2008-12-31_01-45-36AM.log
Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2008-12-31_01-45-36AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (3):
Oracle Database 10g 10.2.0.1.0
Oracle Database 10g Products 10.2.0.1.0
Oracle Database 10g Release 2 Patch Set 3 10.2.0.4.0
There are 3 products installed in this Oracle Home.
Interim patches (2) :
Patch 5099019 : applied on Wed Dec 31 01:42:18 PET 2008
Created on 1 Dec 2008, 08:03:06 hrs PST8PDT
Bugs fixed:
5099019
Patch 6996030 : applied on Wed Sep 10 11:08:30 PET 2008
Created on 21 Oct 2008, 06:57:58 hrs PST8PDT
Bugs fixed:
6964283, 6940487, 4740049, 6996030, 6954407, 6023472, 4085593, 6340297
6655588, 6726958
--------------------------------------------------------------------------------
OPatch succeeded.
Tenemos un par de patches ya aplicados, el 5099019 dbms_stats doesn’t count leaf_blocks correctly, y el 6996030 Merge label request on top of 10.2.0.4 for audit trail clean-up, pero ahora queremos aplicar muchos más:
[oracle@caliope ~]$ ls /home/oracle/patches
4459936 5586604 6051177 6084232 6399168 6894671 6926448 7123643 7191744
7243560 5523375 5895190 6055481 6369463 6678845 6897966 7025450 7189722
7226463 7331929
[oracle@caliope ~]$ opatch prereq CheckConflictAmongPatchesWithDetail -phBaseDir /home/oracle/patches
Invoking OPatch 10.2.0.4.5
Oracle Interim Patch Installer version 10.2.0.4.5
Copyright (c) 2008, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.5
OUI version : 10.2.0.4.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2008-12-31_01-47-03AM.log
Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictamongpatcheswithdetail"
Prereq "checkConflictAmongPatchesWithDetail" failed.
Summary of Conflict Analysis:
Patches that can be applied now without any conflicts are :
4459936, 5523375, 5586604, 5895190, 6051177, 6055481, 6084232, 6369463, 6399168, 6678845, 6894671, 6897966, 6926448, 7123643, 7189722, 7226463, 7243560, 7331929
Following patches have conflicts. Please contact Oracle Support and get the merged patch of the patches :
7025450, 7191744
Conflicts/Supersets for each patch are:
Patch : 7025450
Generic Conflict with 7191744
Conflict details:
/u01/app/oracle/product/10.2.0/db_1/lib/libserver10.a:/kks1.o
Patch : 7191744
Generic Conflict with 7025450
Conflict details:
/u01/app/oracle/product/10.2.0/db_1/lib/libserver10.a:/kks1.o
OPatch succeeded.
OPatch nos notifica que existe un conflicto entre los patches 7025450 dbms_shared_pool.keep doesn’t keep future child cursors, y 7191744 update in wrong schema, pero ¿existirán conflictos adicionales con los patches ya instalados? pues averigüémoslo:
[oracle@caliope ~]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/patches/
Invoking OPatch 10.2.0.4.5
Oracle Interim Patch Installer version 10.2.0.4.5
Copyright (c) 2008, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.5
OUI version : 10.2.0.4.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2008-12-31_01-47-28AM.log
Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" failed.
Summary of Conflict Analysis:
Patches that can be applied now without any conflicts are :
5523375, 5586604, 5895190, 6051177, 6055481, 6084232, 6369463, 6678845, 6894671, 6897966, 6926448, 7123643, 7189722, 7226463, 7243560, 7331929
Following patches have conflicts. Please contact Oracle Support and get the merged patch of the patches :
6996030, 4459936, 5099019, 6399168, 7025450, 7191744
Following patches will be rolled back from Oracle Home on application of the patches in the given list :
6996030, 5099019
Conflicts/Supersets for each patch are:
Patch : 4459936
Generic Conflict with 6996030
Conflict details:
/u01/app/oracle/product/10.2.0/db_1/lib/libserver10.a:/kzft.o
Patch : 6399168
Generic Conflict with 5099019
Conflict details:
/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/prvtstat.plb
Patch : 7025450
Generic Conflict with 7191744
Conflict details:
/u01/app/oracle/product/10.2.0/db_1/lib/libserver10.a:/kks1.o
Patch : 7191744
Generic Conflict with 7025450
Conflict details:
/u01/app/oracle/product/10.2.0/db_1/lib/libserver10.a:/kks1.o
OPatch succeeded.
Pues desafortunadamente hay conflictos adicionales, esta vez entre el patch 4459936 FGA doesn’t work correctly with ansi outer joins in 10g, y el 6996030 Merge label request on top of 10.2.0.4 for audit trail clean-up, algo que ya habíamos visto, y también entre el patch 6399168 gather statistics on table with bitmap indexes runs forever, y el 5099019 dbms_stats doesn’t count leaf_blocks correctly.
Con esta información ya podemos continuar con la aplicación de los patches que no presentarán conflictos y para los casos en que sí, debemos abrir un Service Request en My Oracle Support, solicitando se nos proporcione un merged patch tal como OPatch nos ha sugerido:
Following patches have conflicts. Please contact Oracle Support and get the merged patch of the patches : 6996030, 4459936, 5099019, 6399168, 7025450, 7191744
Recomendaciones Finales
Procura tener la última versión de OPatch, misma que puedes obtener buscando el patch 6880880; instalarlo es muy fácil solo tienes que descomprimirlo en $ORACLE_HOME/OPatch.
Luego que lo tengas instalado procede a obtener todos los patches que te interesa aplicar y descomprímelos bajo una misma carpeta, ahora usa OPatch para verificar la presencia de conflictos entre ellos y los ya aplicados. De existir algún conflicto solicita a Oracle que te proporcione un merged patch.
Finalmente, te recomiendo leer las notas:
458485.1 | How to find whether the one-off Patches will conflict or not? |
551394.1 | What Are The MANDATORY Information Required To File A Merge Patch Request? |