| « Utilizar el Report Builder, sobre todo con el Layout Editor | Dictando curso : Oracle Database 11g : New Features for Administrators - D50081GC11 » |
Aplicar parches en caliente mediante OPatch (hot patching)
En pocas palabras, que tan bueno es la aplicación de HotPatch en Oracle11g ![]()
Hasta el momento no le veo inconvenientes, quizás con los Patchset sea otra cosa.
Pues bien, acá un pequeño ejemplo del OPatch con comandos tales como query , lsinventory , apply y rollback
Cada vez que Oracle nos indica un parche a aplicar, por ejemplo el 5943776, tenemos que bajar el archivo *.zip desde Metalink, descomprimirlo, con lo cual genera una carpeta con el número 5943776 , ingresamos a esa carpeta y podemos comenzar con nuestra aplicación de parche .

Aquí vamos..
1.- Se valida que sea un parche online , comando opatch query -is_online_patch
[oracle@localhost hotpatch]$ pwd
/home/oracle/solutions/OP/hotpatch
[oracle@localhost hotpatch]$ /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch query -is_online_patch
Invoking OPatch 11.1.0.6.0
Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2009-06-21_10-47-12AM.log
--------------------------------------------------------------------------------
Patch is a online patch: true
OPatch succeeded.
[oracle@localhost hotpatch]$
2.- Validamos los parches instalados, mediante el comando opatch lsinventory
[oracle@localhost hotpatch]$ /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch lsinventory
Invoking OPatch 11.1.0.6.0
Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2009-06-21_10-49-13AM.log
Lsinventory Output file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2009-06-21_10-49-13AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.1.0.6.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.
[oracle@localhost hotpatch]$
3.- Aplicamos el parche en caliente, mediante el comando opatch apply
[oracle@localhost hotpatch]$ /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch apply /home/oracle/solutions/OP/hotpatch -connectString orcl::::
Invoking OPatch 11.1.0.6.0
Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2009-06-21_10-53-02AM.log
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
ApplySession applying interim patch '5943776' to OH '/u01/app/oracle/product/11.1.0/db_1'
Running prerequisite checks...
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '5943776' for restore. This might take a while...
Backing up files affected by the patch '5943776' for rollback. This might take a while...
Patching component oracle.rdbms, 11.1.0.6.0...
The patch will be installed on active database instances.
Running mkpatch on 'bug5943776_1.pch' to make it compatible with the Oracle binary...
Installing and enabling the online patch 'bug5943776_1.pch', on database 'orcl'.
ApplySession adding interim patch '5943776' to inventory
Verifying the update...
Inventory check OK: Patch ID 5943776 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 5943776 are present in Oracle Home.
OPatch succeeded.
4.- Verificamos nuevamente los parches aplicados, mediante el comando lsinventory
[oracle@localhost hotpatch]$ /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch lsinventory
Invoking OPatch 11.1.0.6.0
Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2009-06-21_10-56-34AM.log
Lsinventory Output file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2009-06-21_10-56-34AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.1.0.6.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 5943776 : applied on Sun Jun 21 10:53:52 CLT 2009
Created on 26 Jul 2007, 13:29:43 hrs EST5EDT
Bugs fixed:
5943776
--------------------------------------------------------------------------------
OPatch succeeded.
5.- Si se requiere remover , ocupamos el comando opatch rollback
[oracle@localhost hotpatch]$ /u01/app/oracle/product/11.1.0/db_1/OPatch/opatch rollback -id 5943776 -connectString orcl
Invoking OPatch 11.1.0.6.0
Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2009-06-21_11-15-57AM.log
RollbackSession rolling back interim patch '5943776' from OH '/u01/app/oracle/product/11.1.0/db_1'
The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Running prerequisite checks...
OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.
Backing up files affected by the patch '5943776' for restore. This might take a while...
Patching component oracle.rdbms, 11.1.0.6.0...
The patch will be removed from active database instances.
Disabling and removing online patch 'bug5943776_1.pch', on database 'orcl'
RollbackSession removing interim patch '5943776' from inventory
OPatch succeeded.
Mas información sobre OPatch en Oracle11g
![]()
![]()
23.06.09. 11:43:21. 931 words, 21931 views. Categories: Base de datos, Oracle 11g , Leave a comment » • 1 trackback »
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
1 trackback
This post has 505 feedbacks awaiting moderation...