The main thing in this article is, applying a group of patches at a time using some scripts.
Step 1: We have to apply following 6 Patches to 10.2.0.2 home after upgrading it from 10.2.0.1. The following are the required Patches.
| 1) 5117016 2) 5458753 3) 5075470 4) 4689959 5) 4712729 6) 4966417 |
Step 2: Create a directory /tmp/Patches/
Step 3: Create a file "apply_all.sh" file with the following code.
cd /tmp/Patches
vi apply_all.sh
#!/bin/sh set PATH=${PATH}:${ORACLE_HOME}/OPatch; export PATH #This is the Oracle home where the patches will apply. set OBJECT_MODE=32_64; export OBJECT_MOD for patchid in `cat patches`; do current_dir=`pwd` cd $patchid $ORACLE_HOME/OPatch/opatch apply #This is OPatch software directory which we are using to apply patches. cd $current_dir done exit |
Step 4: Create a file "apply_all.sh" file with the following code.
The above script uses the "patches" file which contains all the patch numbers which we have to apply. So just create a file "patches" with the following content.
vi patches 5458753 5075470 4689959 4712729 4966417 Note: This patchs file may contain any number of patches. It may be one or any number. Here we are applying 6 patches, so this file contains all the 6 Patch numbers which we are applying to this home. |
Step 5: Make sure the all the databases and listeners are down, if any of the databases are using this oracle 10.2.0.2 home.
NOTE:If it is a new host/new home then there is no need to stop any databases because it may not used by any databases.
Step 6:Execution of "apply_all" script.
a) set the environment to current oracle home i.e. 10.2.0.2 - setenv ORACLESID b) Double check the $ORACLE_HOME; env | grep ORA ; -> It should set to 10.2.0.2 home. b) cd /tmp/Patches; c) chmod 775 apply_all.sh d) ./apply_all |
No comments:
Post a Comment