Tuesday, August 28, 2012

Applying Opatch in simple way

Applying a Opatch
Detail description on applying opatch can be find Oracle Documentation. Hear is shall quickly explain you simple way of applying patch
Note: I would still recommend you to read oracle documentation before applying

Step by Step execution
$ bash
$ export ORACLE_HOME=/scratch/aime1/PS4_SOA/mw970/soa8310
$ export MW_HOME=/scratch/aime1/PS4_SOA/mw970
$ echo $ORACLE_HOME
/scratch/aime1/PS4_SOA/mw970/soa8310
$ cd /scratch/aime1
$ mkdir OraInventory tmp
$ export TMP=`pwd`
$ export TMPDIR=`pwd`
$ cd OraInventory
$ echo inventory_loc=`pwd` > ../oraInst.loc
$ pwd
/scratch/aime1/OraInventory
==========================opatch help=================================
$ /scratch/aime1/PS4_SOA/mw970/soa8310/OPatch/opatch -help
Invoking OPatch 11.1.0.8.3

Oracle Interim Patch Installer version 11.1.0.8.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


 Usage: opatch [ -help ] [ -r[eport] ] [ command ]

            command := apply
                       lsinventory
                       napply
                       nrollback
                       rollback
                       query
                       version
                       prereq
                       util

 <global_arguments> := -help       Displays the help message for the command.
                       -report     Print the actions without executing.

 example:
   'opatch -help'
   'opatch -help -fmw'
   'opatch auto -help'
   'opatch apply -help'
   'opatch lsinventory -help'
   'opatch napply -help'
   'opatch nrollback -help'

   'opatch rollback -help'
   'opatch prereq -help'
   'opatch util -help'


OPatch succeeded.
==========================opatch check inventroy location=====================

bash-3.2$ /scratch/aime1/PS4_SOA/mw970/soa8310/OPatch/opatch lsinventory -invPtrLoc /scratch/aime1/PS4_SOA/mw970/soa8310/oraInst.loc
Invoking OPatch 11.1.0.8.3

Oracle Interim Patch Installer version 11.1.0.8.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /scratch/aime1/PS4_SOA/mw970/soa8310
Central Inventory : /ade/aime1_dte5759/oracle/work/FMW_SOA_INST/oraInventory
   from           : /scratch/aime1/PS4_SOA/mw970/soa8310/oraInst.loc
OPatch version    : 11.1.0.8.3
OUI version       : 11.1.0.9.0
OUI location      : /scratch/aime1/PS4_SOA/mw970/soa8310/oui
Log file location : /scratch/aime1/PS4_SOA/mw970/soa8310/cfgtoollogs/opatch/opat
ch2012-08-28_01-36-13AM.log

Patch history file: /scratch/aime1/PS4_SOA/mw970/soa8310/cfgtoollogs/opatch/opat
ch_history.txt


OPatch detects the Middleware Home as "/scratch/aime1/PS4_SOA/mw970"

Lsinventory Output file location : /scratch/aime1/PS4_SOA/mw970/soa8310/cfgtooll
ogs/opatch/lsinv/lsinventory2012-08-28_01-36-13AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle SOA Suite 11g                                                 11.1.1.5.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.

==========================opatch apply=================================
bash-3.2$ cd 14203193
bash-3.2$ ls
etc  files  README.txt
bash-3.2$ /scratch/aime1/PS4_SOA/mw970/soa8310/OPatch/opatch apply -invPtrLoc /scratch/aime1/PS4_SOA/mw970/soa8310/oraInst.loc
Invoking OPatch 11.1.0.8.3

Oracle Interim Patch Installer version 11.1.0.8.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.


Oracle Home       : /scratch/aime1/PS4_SOA/mw970/soa8310
Central Inventory : /ade/aime1_dte5759/oracle/work/FMW_SOA_INST/oraInventory
   from           : /scratch/aime1/PS4_SOA/mw970/soa8310/oraInst.loc
OPatch version    : 11.1.0.8.3
OUI version       : 11.1.0.9.0
OUI location      : /scratch/aime1/PS4_SOA/mw970/soa8310/oui
Log file location : /scratch/aime1/PS4_SOA/mw970/soa8310/cfgtoollogs/opatch/opatch2012-08-29_22-36-05PM.log

Patch history file: /scratch/aime1/PS4_SOA/mw970/soa8310/cfgtoollogs/opatch/opatch_history.txt


OPatch detects the Middleware Home as "/scratch/aime1/PS4_SOA/mw970"

ApplySession applying interim patch '14203193' to OH '/scratch/aime1/PS4_SOA/mw970/soa8310'

Running prerequisite checks...

OPatch detected non-cluster Oracle Home from the inventory and will patch the local
system only.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/scratch/aime1/PS4_SOA/mw970/soa8310')


Is the local system ready for patching? [y|n]
yes
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '14203193' for restore. This might take a while...
Backing up files affected by the patch '14203193' for rollback. This might take a while...

Patching component oracle.integration.soainfra, 11.1.1.5.0...
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/decision/decision_deleteComponentInstancesDOP.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/decision/decision_deleteNoCompositeIdInstances.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/decision/purge_decision_oracle.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/fabric/fabric_createTempTable.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/fabric/fabric_deleteNoCompositeIdInstances.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/fabric/purge_fabric_oracle.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/mediator/mediator_createTempTables.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/mediator/mediator_deleteNoCompositeIdInstances.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/mediator/purge_mediator_oracle.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/orabpel/orabpel_deleteComponentInstances.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/orabpel/orabpel_deleteComponentInstancesDOP.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/orabpel/orabpel_deleteNoCompositeIdInstances.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/orabpel/purge_bpel_oracle.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/soa/delete_instances.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/soa/delete_instances_in_parallel.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/soa/delete_insts_in_parallel_job.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/soa/purge_soa_oracle.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/workflow/hwf_createTempTables.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/workflow/hwf_deleteNoCompositeIdInstances.sql"
Copying file to "/scratch/aime1/PS4_SOA/mw970/soa8310/rcu/integration/soainfra/sql/soa_purge/workflow/purge_hwf_oracle.sql"
ApplySession adding interim patch '14203193' to inventory

Verifying the update...
Inventory check OK: Patch ID 14203193 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 14203193 are present in Oracle Home.

The local system has been patched and can be restarted.


OPatch succeeded.


===========================================================

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete