#acl merlyn:read,write All:read <> == 1 == http://rohitsinhago.blogspot.com/2010/09/how-to-apply-oracle-patch-opatch.html https://www.pythian.com/blog/step-by-step-jan-2016-psu-patch/ export PATH=$PATH:$HOME:$ORACLE_HOME/OPatch:/bin {{{ [oracle@mls-rac02 dbhome_1]$ opatch version OPatch Version: 11.2.0.3.4 OPatch succeeded. [oracle@mls-rac02 dbhome_1]$ opatch lsinventory Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2017-05-09_14-58-40PM_1.log Lsinventory Output file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2017-05-09_14-58-40PM.txt -------------------------------------------------------------------------------- Installed Top-level Products (1): Oracle Database 11g 11.2.0.4.0 There are 1 products installed in this Oracle Home. There are no Interim patches installed in this Oracle Home. Rac system comprising of multiple nodes Local node = mls-rac02 Remote node = mls-rac01 -------------------------------------------------------------------------------- OPatch succeeded. }}} == Start the patch == === unzip the patch === unzip -d /loc_2_unzip p.zip === Go the patch directory === cd /loc_2_unzip/patch_number === check if rollpatch === {{{ [oracle@mls-rac01 opath]$ opatch query -is_rolling_patch /media/opath/18498878/ Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2017-05-10_15-52-26PM_1.log -------------------------------------------------------------------------------- Patch is a rolling patch: true OPatch succeeded. }}} {{{ [oracle@mls-rac01 20907061]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./ Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved. PREREQ session Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2017-05-10_15-55-31PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. }}} === Bring down the listner === {{{ srvctl stop listener srvctl stop scan_listener }}} === Bring down the database === {{{ srvctl stop database -d HRDB }}} * skip_duplicate Skips patches to be applied that are duplicates of other patches installed in the Oracle home. Two patches are duplicates if they fix the same set of bugs. * skip_subset Skips patches to be applied that are subsets of other patches installed in the Oracle home. One patch is a subset of another patch if the former fixes a subset of bugs fixed by the latter. {{{ opatch napply -skip_subset -skip_duplicate }}} === To install the patch, follow these steps: === 1. Set your current directory to the directory where the patch is located and then run the OPatch utility by entering the following commands: $ cd /20907061 $ opatch apply OR: $ opatch napply -skip_subset -skip_duplicate 2. Verify whether the patch has been successfully installed by running the following command: $ opatch lsinventory 3. Start the services from the Oracle home. {{{ [oracle@mls-rac01 20907061]$ opatch napply -skip_subset -skip_duplicate Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved. Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1 Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/11.2.0/dbhome_1/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2017-05-10_16-00-49PM_1.log Verifying environment and performing prerequisite checks... Checking skip_duplicate Checking skip_subset OPatch continues with these patches: 20907061 Do you want to proceed? [y|n] y User Responded with: Y All checks passed. This node is part of an Oracle Real Application Cluster. Remote nodes: 'mls-rac02' Local node: 'mls-rac01' Please shutdown Oracle instances running out of this ORACLE_HOME on the local system. (Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '20907061' to OH '/u01/app/oracle/product/11.2.0/dbhome_1' Patching component oracle.rdbms, 11.2.0.4.0... Verifying the update... Patching in rolling mode. The node 'mls-rac02' will be patched next. Please shutdown Oracle instances running out of this ORACLE_HOME on 'mls-rac02'. (Oracle Home = '/u01/app/oracle/product/11.2.0/dbhome_1') Is the node ready for patching? [y|n] y User Responded with: Y Updating nodes 'mls-rac02' Apply-related files are: FP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/copy_files.txt" DP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/copy_dirs.txt" MP = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/make_cmds.txt" RC = "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/remote_cmds.txt" Instantiating the file "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/copy_files.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/copy_files.txt" with actual path. Propagating files to remote nodes... Instantiating the file "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/copy_dirs.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/copy_dirs.txt" with actual path. Propagating directories to remote nodes... Instantiating the file "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/make_cmds.txt.instantiated" by replacing $ORACLE_HOME in "/u01/app/oracle/product/11.2.0/dbhome_1/.patch_storage/NApply/2017-05-10_16-00-49PM/rac/make_cmds.txt" with actual path. Running command on remote node 'mls-rac02': cd /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib; /usr/bin/make -f ins_rdbms.mk ioracle ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 || echo REMOTE_MAKE_FAILED::>&2 RC file not exist. There are no commands to be run on the remote nodes. The node 'mls-rac02' has been patched. You can restart Oracle instances on it. Patch 20907061 successfully applied. Log file location: /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2017-05-10_16-00-49PM_1.log OPatch succeeded. }}}