Oracle Provisioning and Patch Automation for Database Pack

Installation Instructions for Application of Patch 24448103 on prod-cluster System.

Generated at Tuesday, January 3, 2017 7:57:19 PM EST by root on host ohs1 for apply operation using OPlan version 12.2.0.1.8.

Important Note: Refer to the Known Issues section of the Appendix A: Patch Readme before following these installation instructions.

Overview of the System

Important Note: The following diagrammatically represents the system configuration information collected by Oracle. Oracle recommends that you carefully examine this data and verify that it is complete and correct. If you see any discrepancies between the graphic and your actual system configuration, do not follow the instructions outlined in this document. Instead, follow the patch installation instructions provided in the patch README located at Appendix A: Patch Readme..

There are 15 entities in prod-cluster system.

Configuration image not found. Original image was generated on host ohs1 at /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/2017-01-03-19-56-31/configuration.png . To view the image, copy it to the same folder as this HTML file.



Select A Patch Application Option

  1. Out-of-Place Patching: Apply Patch to a Cloned Oracle Home and SwitchIn this option, each existing Oracle Home will be cloned before patching. The patch will then be applied to each clone. After patching is complete, resources will be stopped on all existing Oracle Homes, then started from the patched Oracle Home clones, in sequence. This option is time-consuming but ensures minimal loss of service and quick recovery from failures, as patches are not applied directly to existing instances.

    1. Oracle Recommended - Clone Existing Oracle Homes, Patch and Switch to Each Clone in Rolling Mode:
      • Advantages: No downtime while patching; offers best diagnosability of issues during patching; quick recovery from failures since patch is not applied to in-use Oracle Homes.
      • Disadvantages: Most time-consuming option with greatest number of steps.
      • Total number of steps required: 89
        • During the full availability of services: 63
        • During the partial availability of services: 26
      Click here for detailed Oracle Recommended - Clone Existing Oracle Homes, Patch and Switch to Each Clone in Rolling Mode steps.

      If issues are encountered during Out-of-Place patching, you can safely revert back to the original Oracle Home using the Switchback method.
      Click here for detailed Switchback to Old Home During Out of Place Patching steps.

  2. In-Place Patching: Apply Patch to Existing Oracle HomesIn this option, the patch will be applied directly to the specified Oracle Homes. This is the least time-consuming option. The procedures available for this option are outlined below.

    1. Rolling Mode: Apply Patch to Each Node In A Cluster Sequentially Resources running on each node in the cluster will be stopped, patched and then restarted, one at a time in sequence. By patching only one node at a time, this approach ensures that multi-instance databases remain available during the patching process, but it will take longer to complete.

      1. Apply Patch In-Place using OPatch Auto Command in Rolling Mode:
        • Advantages: No downtime while patching; fewer patching steps.
        • Disadvantages: May be time consuming; less-than-optimal diagnosability of issues during patching; slower recovery from failures.
        • Total number of steps required: 33
          • During the full availability of services: 27
          • During the partial availability of services: 6
        Click here for detailed Apply Patch In-Place using OPatch Auto Command in Rolling Mode steps.

      2. Apply Patch In-Place using OPatch Command in Rolling Mode:
        • Advantages: No downtime while patching; offers best diagnosability of issues during patching.
        • Disadvantages: May be time consuming; greater number of steps; slower recovery from failures.
        • Total number of steps required: 44
          • During the full availability of services: 26
          • During the partial availability of services: 18
        Click here for detailed Apply Patch In-Place using OPatch Command in Rolling Mode steps.

    2. Non-Rolling Mode: Apply Patch to All Cluster Nodes SimultaneouslyAll resources will be shut down first before the patch is applied to each node. This approach is less time consuming but will result in temporary loss of service availability.

      1. Apply Patch In-Place using OPatch Command in Non-rolling Mode:
        • Advantages: Shorter patching time; offers best diagnosability of issues during patching.
        • Disadvantages: Loss of service while patching; greater number of steps; slower recovery from failures
        • Total number of steps required: 45
          • During the full availability of services: 26
          • During the downtime of all services: 19
        Click here for detailed Apply Patch In-Place using OPatch Command in Non-rolling Mode steps.


Important Note:

Summary: Patch Apply Steps for Clone & Patch



Detailed Clone & Patch Apply Steps


Step 1: Stage patch and perform pre-apply check (All services will be up)

Step 1.1: Stage patch and perform pre-apply check on ohs1
Step 1.1.1: Perform Configuration Compare

This step ensures that the steps generated are up-to-date for the current system configuration.
Perform comparison of the configuration XML with the current system configuration.

If the message displayed is The two system configurations are same., continue patching following the steps given.

If the message displayed is The two system configurations are different. , regenerate the patching steps by running oplan again.

As the root user on the host ohs1 run the following command:

[root@ohs1]#
ORACLE_HOME=/pgold/orgrid/oracle/product/121 /pgold/orgrid/oracle/product/121/OPatch/oplan/../auto/core/bin/oplan.sh configurationCompare /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/2017-01-03-19-56-31/machine-readable/configData.xml


Step 1.1.2: Copy all patches to ohs1

Make sure the patch(es) 24448103 is present on node ohs1 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs1 at the above location while logged in as the owner of your grid infrastructure home.


Step 1.1.3: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.4: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.5: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.1.6: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.1.7: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.1.8: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.9: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.10: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.11: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.12: Check for Space Required To Clone Oracle Home

Run du command to gather oracle home size. Then verify if at least that much space is available in the partition for the clone of this Oracle home.

Example:
# command to gather disk space required
du -skh /pgold/orgrid/oracle/product/121

# command to check available disk space in a partition
df -h /pgold/orgrid/oracle/product/121

Important Note: Group the Oracle Homes by filesystem partitions, add up the disk space required, and ensure that all the cloned homes will have sufficient disk space.


Step 1.2: Stage patch and perform pre-apply check on ohs2
Step 1.2.1: Copy all patches to ohs2

Make sure the patch(es) 24448103 is present on node ohs2 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs2 at the above location while logged in as the owner of your grid infrastructure home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p /mnt

[orgrid@ohs2]$
scp -r ohs1:/mnt/24448103 /mnt/24448103


Step 1.2.2: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.3: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.4: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.2.5: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.2.6: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.2.7: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.8: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.9: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.10: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.11: Check for Space Required To Clone Oracle Home

Run du command to gather oracle home size. Then verify if at least that much space is available in the partition for the clone of this Oracle home.

Example:
# command to gather disk space required
du -skh /pgold/orgrid/oracle/product/121

# command to check available disk space in a partition
df -h /pgold/orgrid/oracle/product/121

Important Note: Group the Oracle Homes by filesystem partitions, add up the disk space required, and ensure that all the cloned homes will have sufficient disk space.


Step 2: Clone Oracle homes and apply patch to cloned Oracle homes (All services will be up)

Step 2.1: Clone Oracle homes and apply patch to cloned Oracle homes on ohs1
Step 2.1.1: Copy Grid Infrastructure Home

Copy the files in the existing Oracle home to a new location. Please ignore the messages "File changes as we read it" when copying files over.

As the root user on the host ohs1 run the following commands:

[root@ohs1]#
echo '#!/bin/bash' > /tmp/chgchown

[root@ohs1]#
echo 'array=( /pgold /pgold/orgrid /pgold/orgrid/oracle /pgold/orgrid/oracle/product )' >> /tmp/chgchown

[root@ohs1]#
echo 'for dir in "${array[@]}"' >> /tmp/chgchown

[root@ohs1]#
echo 'do' >> /tmp/chgchown

[root@ohs1]#
echo ' if [ ! -d $dir ]; then' >> /tmp/chgchown

[root@ohs1]#
echo 'echo 'Creating ' $dir' >> /tmp/chgchown

[root@ohs1]#
echo 'mkdir $dir' >> /tmp/chgchown

[root@ohs1]#
echo $'group=`ls -ld /pgold/orgrid/oracle/product/121 | awk \'{print $4}\'`'>> /tmp/chgchown

[root@ohs1]#
echo 'chgrp $group $dir' >> /tmp/chgchown

[root@ohs1]#
echo $'owner=`ls -ld /pgold/orgrid/oracle/product/121 | awk \'{print $3}\'`'>> /tmp/chgchown

[root@ohs1]#
echo 'chown $owner $dir' >> /tmp/chgchown

[root@ohs1]#
echo 'fi' >> /tmp/chgchown

[root@ohs1]#
echo 'done' >> /tmp/chgchown

[root@ohs1]#
chmod +x /tmp/chgchown

[root@ohs1]#
/tmp/chgchown

[root@ohs1]#
cp -pR /pgold/orgrid/oracle/product/121 /pgold/orgrid/oracle/product/121_2

[root@ohs1]#
rm /pgold/orgrid/oracle/product/121_2/root.sh


Step 2.1.2: Run OPatch System Space Check for Clone of OraGI12Home1

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan

[orgrid@ohs1]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121_2/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121_2/oraInst.loc


Step 2.1.3: Unlock Clone of OraGI12Home1

Unlock new Oracle home using rootcrs.pl.

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -prepatch -dstcrshome /pgold/orgrid/oracle/product/121_2


Step 2.1.4: Run clone.pl on Clone of OraGI12Home1

Run clone.pl on the new Oracle home. Ignore the message generated by the clone.pl script that asks the user to run root script.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/usr/bin/perl /pgold/orgrid/oracle/product/121_2/clone/bin/clone.pl ORACLE_BASE=/pgold/orgrid/grid_base ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 INVENTORY_LOCATION=/pgold/oraInventory -defaultHomeName -O'"CLUSTER_NODES={ohs1,ohs2}"' -O'"LOCAL_NODE=ohs1"' CRS=false -O'"SHOW_ROOTSH_CONFIRMATION=false"'


The cloning step causes the Oracle binary to be relinked with UDP instead of RDS.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
ORIG_PROTO=$(/pgold/orgrid/oracle/product/121/bin/skgxpinfo)

[orgrid@ohs1]$
if [ $ORIG_PROTO == 'rds' ]; then cd /pgold/orgrid/oracle/product/121_2/rdbms/lib; ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 make -f ins_rdbms.mk ipc_rds ioracle; fi


Step 2.1.6: Run root.sh on Clone of OraGI12Home1


As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121_2/root.sh


Step 2.1.7: Apply Patch to Clone of OraGI12Home1

On ohs1 Apply the patch to the Clone of OraGI12Home1

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
echo /mnt/24448103/21436941 > /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24007012 >> /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24340679 >> /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24846605 >> /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121_2/OPatch/opatch napply -phBaseFile /tmp/OraGI12Home1_2_orgrid_patchList -local -invPtrLoc /pgold/orgrid/oracle/product/121_2/oraInst.loc -oh /pgold/orgrid/oracle/product/121_2 -ocmrf /tmp/ocm.rsp


Step 2.1.8: Copy Database Home

Copy database Home

As the root user on the host ohs1 run the following commands:

[root@ohs1]#
echo '#!/bin/bash' > /tmp/chgchown

[root@ohs1]#
echo 'array=( /pgold /pgold/ordb /pgold/ordb/oracle /pgold/ordb/oracle/product )' >> /tmp/chgchown

[root@ohs1]#
echo 'for dir in "${array[@]}"' >> /tmp/chgchown

[root@ohs1]#
echo 'do' >> /tmp/chgchown

[root@ohs1]#
echo ' if [ ! -d $dir ]; then' >> /tmp/chgchown

[root@ohs1]#
echo 'echo 'Creating ' $dir' >> /tmp/chgchown

[root@ohs1]#
echo 'mkdir $dir' >> /tmp/chgchown

[root@ohs1]#
echo $'group=`ls -ld /pgold/ordb/oracle/product/121 | awk \'{print $4}\'`'>> /tmp/chgchown

[root@ohs1]#
echo 'chgrp $group $dir' >> /tmp/chgchown

[root@ohs1]#
echo $'owner=`ls -ld /pgold/ordb/oracle/product/121 | awk \'{print $3}\'`'>> /tmp/chgchown

[root@ohs1]#
echo 'chown $owner $dir' >> /tmp/chgchown

[root@ohs1]#
echo 'fi' >> /tmp/chgchown

[root@ohs1]#
echo 'done' >> /tmp/chgchown

[root@ohs1]#
chmod +x /tmp/chgchown

[root@ohs1]#
/tmp/chgchown

[root@ohs1]#
cp -pR /pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121_2

[root@ohs1]#
rm /pgold/ordb/oracle/product/121_2/root.sh


Step 2.1.9: Run OPatch System Space Check for Clone of OraDB12Home1

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan

[oracle@ohs1]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
/pgold/ordb/oracle/product/121_2/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121_2/oraInst.loc


Step 2.1.10: Run clone.pl on Clone of OraDB12Home1

Run clone.pl on the new Oracle home. Ignore the message generated by the clone.pl script that asks the user to run root script.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/usr/bin/perl /pgold/ordb/oracle/product/121_2/clone/bin/clone.pl ORACLE_BASE=/pgold/ordb/oracle/product ORACLE_HOME=/pgold/ordb/oracle/product/121_2 -defaultHomeName


Relink the binary to enable RAC explicitly

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121_2/rdbms/lib; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 make -f ins_rdbms.mk rac_on ioracle


The cloning step causes the Oracle binary to be relinked with UDP instead of RDS.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
ORIG_PROTO=$(/pgold/ordb/oracle/product/121/bin/skgxpinfo)

[oracle@ohs1]$
if [ $ORIG_PROTO == 'rds' ]; then cd /pgold/ordb/oracle/product/121_2/rdbms/lib; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 make -f ins_rdbms.mk ipc_rds ioracle; fi


Step 2.1.13: Run root.sh on Clone of OraDB12Home1


As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/ordb/oracle/product/121_2/root.sh


Step 2.1.14: Run Pre Patch Script before applying Patch to Clone of OraDB12Home1

On ohs1 Run Pre Patch Script before applying Patch to the Clone of OraDB12Home1

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/mnt/24448103/24846605/custom/scripts/prepatch.sh -dbhome /pgold/ordb/oracle/product/121_2


Step 2.1.15: Apply Patch to Clone of OraDB12Home1

On ohs1 Apply the patch to the Clone of OraDB12Home1

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
echo /mnt/24448103/24340679 > /tmp/OraDB12Home1_2_oracle_patchList

[oracle@ohs1]$
echo /mnt/24448103/24846605 >> /tmp/OraDB12Home1_2_oracle_patchList

[oracle@ohs1]$
/pgold/ordb/oracle/product/121_2/OPatch/opatch napply -phBaseFile /tmp/OraDB12Home1_2_oracle_patchList -local -invPtrLoc /pgold/ordb/oracle/product/121_2/oraInst.loc -oh /pgold/ordb/oracle/product/121_2 -ocmrf /tmp/ocm.rsp


Step 2.1.16: Run Post Patch Script after applying Patch to Clone of OraDB12Home1

On ohs1 Run Post Patch Script after applying Patch to the Clone of OraDB12Home1

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/mnt/24448103/24846605/custom/scripts/postpatch.sh -dbhome /pgold/ordb/oracle/product/121_2


Step 2.2: Clone Oracle homes and apply patch to cloned Oracle homes on ohs2
Step 2.2.1: Copy Grid Infrastructure Home

Copy the files in the existing Oracle home to a new location. Please ignore the messages "File changes as we read it" when copying files over.

As the root user on the host ohs2 run the following commands:

[root@ohs2]#
echo '#!/bin/bash' > /tmp/chgchown

[root@ohs2]#
echo 'array=( /pgold /pgold/orgrid /pgold/orgrid/oracle /pgold/orgrid/oracle/product )' >> /tmp/chgchown

[root@ohs2]#
echo 'for dir in "${array[@]}"' >> /tmp/chgchown

[root@ohs2]#
echo 'do' >> /tmp/chgchown

[root@ohs2]#
echo ' if [ ! -d $dir ]; then' >> /tmp/chgchown

[root@ohs2]#
echo 'echo 'Creating ' $dir' >> /tmp/chgchown

[root@ohs2]#
echo 'mkdir $dir' >> /tmp/chgchown

[root@ohs2]#
echo $'group=`ls -ld /pgold/orgrid/oracle/product/121 | awk \'{print $4}\'`'>> /tmp/chgchown

[root@ohs2]#
echo 'chgrp $group $dir' >> /tmp/chgchown

[root@ohs2]#
echo $'owner=`ls -ld /pgold/orgrid/oracle/product/121 | awk \'{print $3}\'`'>> /tmp/chgchown

[root@ohs2]#
echo 'chown $owner $dir' >> /tmp/chgchown

[root@ohs2]#
echo 'fi' >> /tmp/chgchown

[root@ohs2]#
echo 'done' >> /tmp/chgchown

[root@ohs2]#
chmod +x /tmp/chgchown

[root@ohs2]#
/tmp/chgchown

[root@ohs2]#
cp -pR /pgold/orgrid/oracle/product/121 /pgold/orgrid/oracle/product/121_2

[root@ohs2]#
rm /pgold/orgrid/oracle/product/121_2/root.sh


Step 2.2.2: Run OPatch System Space Check for Clone of OraGI12Home1

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan

[orgrid@ohs2]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121_2/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121_2/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121_2/oraInst.loc


Step 2.2.3: Unlock Clone of OraGI12Home1

Unlock new Oracle home using rootcrs.pl.

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -prepatch -dstcrshome /pgold/orgrid/oracle/product/121_2


Step 2.2.4: Run clone.pl on Clone of OraGI12Home1

Run clone.pl on the new Oracle home. Ignore the message generated by the clone.pl script that asks the user to run root script.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/usr/bin/perl /pgold/orgrid/oracle/product/121_2/clone/bin/clone.pl ORACLE_BASE=/pgold/orgrid/grid_base ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 INVENTORY_LOCATION=/pgold/oraInventory -defaultHomeName -O'"CLUSTER_NODES={ohs1,ohs2}"' -O'"LOCAL_NODE=ohs2"' CRS=false -O'"SHOW_ROOTSH_CONFIRMATION=false"'


The cloning step causes the Oracle binary to be relinked with UDP instead of RDS.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
ORIG_PROTO=$(/pgold/orgrid/oracle/product/121/bin/skgxpinfo)

[orgrid@ohs2]$
if [ $ORIG_PROTO == 'rds' ]; then cd /pgold/orgrid/oracle/product/121_2/rdbms/lib; ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 make -f ins_rdbms.mk ipc_rds ioracle; fi


Step 2.2.6: Run root.sh on Clone of OraGI12Home1


As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121_2/root.sh


Step 2.2.7: Apply Patch to Clone of OraGI12Home1

On ohs2 Apply the patch to the Clone of OraGI12Home1

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
echo /mnt/24448103/21436941 > /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24007012 >> /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24340679 >> /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24846605 >> /tmp/OraGI12Home1_2_orgrid_patchList

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121_2/OPatch/opatch napply -phBaseFile /tmp/OraGI12Home1_2_orgrid_patchList -local -invPtrLoc /pgold/orgrid/oracle/product/121_2/oraInst.loc -oh /pgold/orgrid/oracle/product/121_2 -ocmrf /tmp/ocm.rsp


Step 2.2.8: Copy Database Home

Copy database Home

As the root user on the host ohs2 run the following commands:

[root@ohs2]#
echo '#!/bin/bash' > /tmp/chgchown

[root@ohs2]#
echo 'array=( /pgold /pgold/ordb /pgold/ordb/oracle /pgold/ordb/oracle/product )' >> /tmp/chgchown

[root@ohs2]#
echo 'for dir in "${array[@]}"' >> /tmp/chgchown

[root@ohs2]#
echo 'do' >> /tmp/chgchown

[root@ohs2]#
echo ' if [ ! -d $dir ]; then' >> /tmp/chgchown

[root@ohs2]#
echo 'echo 'Creating ' $dir' >> /tmp/chgchown

[root@ohs2]#
echo 'mkdir $dir' >> /tmp/chgchown

[root@ohs2]#
echo $'group=`ls -ld /pgold/ordb/oracle/product/121 | awk \'{print $4}\'`'>> /tmp/chgchown

[root@ohs2]#
echo 'chgrp $group $dir' >> /tmp/chgchown

[root@ohs2]#
echo $'owner=`ls -ld /pgold/ordb/oracle/product/121 | awk \'{print $3}\'`'>> /tmp/chgchown

[root@ohs2]#
echo 'chown $owner $dir' >> /tmp/chgchown

[root@ohs2]#
echo 'fi' >> /tmp/chgchown

[root@ohs2]#
echo 'done' >> /tmp/chgchown

[root@ohs2]#
chmod +x /tmp/chgchown

[root@ohs2]#
/tmp/chgchown

[root@ohs2]#
cp -pR /pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121_2

[root@ohs2]#
rm /pgold/ordb/oracle/product/121_2/root.sh


Step 2.2.9: Run OPatch System Space Check for Clone of OraDB12Home1

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan

[oracle@ohs2]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
/pgold/ordb/oracle/product/121_2/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121_2/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121_2/oraInst.loc


Step 2.2.10: Run clone.pl on Clone of OraDB12Home1

Run clone.pl on the new Oracle home. Ignore the message generated by the clone.pl script that asks the user to run root script.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/usr/bin/perl /pgold/ordb/oracle/product/121_2/clone/bin/clone.pl ORACLE_BASE=/pgold/ordb/oracle/product ORACLE_HOME=/pgold/ordb/oracle/product/121_2 -defaultHomeName


Relink the binary to enable RAC explicitly

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121_2/rdbms/lib; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 make -f ins_rdbms.mk rac_on ioracle


The cloning step causes the Oracle binary to be relinked with UDP instead of RDS.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
ORIG_PROTO=$(/pgold/ordb/oracle/product/121/bin/skgxpinfo)

[oracle@ohs2]$
if [ $ORIG_PROTO == 'rds' ]; then cd /pgold/ordb/oracle/product/121_2/rdbms/lib; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 make -f ins_rdbms.mk ipc_rds ioracle; fi


Step 2.2.13: Run root.sh on Clone of OraDB12Home1


As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/ordb/oracle/product/121_2/root.sh


Step 2.2.14: Run Pre Patch Script before applying Patch to Clone of OraDB12Home1

On ohs2 Run Pre Patch Script before applying Patch to the Clone of OraDB12Home1

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/mnt/24448103/24846605/custom/scripts/prepatch.sh -dbhome /pgold/ordb/oracle/product/121_2


Step 2.2.15: Apply Patch to Clone of OraDB12Home1

On ohs2 Apply the patch to the Clone of OraDB12Home1

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
echo /mnt/24448103/24340679 > /tmp/OraDB12Home1_2_oracle_patchList

[oracle@ohs2]$
echo /mnt/24448103/24846605 >> /tmp/OraDB12Home1_2_oracle_patchList

[oracle@ohs2]$
/pgold/ordb/oracle/product/121_2/OPatch/opatch napply -phBaseFile /tmp/OraDB12Home1_2_oracle_patchList -local -invPtrLoc /pgold/ordb/oracle/product/121_2/oraInst.loc -oh /pgold/ordb/oracle/product/121_2 -ocmrf /tmp/ocm.rsp


Step 2.2.16: Run Post Patch Script after applying Patch to Clone of OraDB12Home1

On ohs2 Run Post Patch Script after applying Patch to the Clone of OraDB12Home1

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/mnt/24448103/24846605/custom/scripts/postpatch.sh -dbhome /pgold/ordb/oracle/product/121_2


Step 3: Switch GI/SIHA to run from cloned Oracle home (Limited services will be available)

Step 3.1: Switch GI/SIHA to run from cloned Oracle home on ohs1
Step 3.1.1: Update nodelist in the inventory for Grid Infrastructure Home


As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 CRS="false" -local


Step 3.1.2: Update nodelist in the inventory for Clone of OraGI12Home1


As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121_2/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 CRS="true" -local


Step 3.1.3: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 3.1.4: Stop the resources running from Database Home

On ohs1 stop the resources running out of the Database Home

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
rm -f /pgold/ordb/oracle/product/121/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2.stat

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl stop home -o /pgold/ordb/oracle/product/121 -n ohs1 -f -stopoption TRANSACTIONAL -s /pgold/ordb/oracle/product/121/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2.stat


Step 3.1.5: Switch stack to Clone of OraGI12Home1

This step initiates downtime, shuts down the GI stack running from the old Oracle home and restarts it from the new cloned home.

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -postpatch -dstcrshome /pgold/orgrid/oracle/product/121_2


Step 3.1.6: Start the resources running from Database Home

On ohs1 start the resources running out of the Database Home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl start home -o /pgold/ordb/oracle/product/121 -n ohs1 -s /pgold/ordb/oracle/product/121/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2.stat


Step 3.1.7: Confirm that all resources have been started


As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121_2/bin/crsctl stat res -t


Step 3.1.8: Edit oratab add modified Clone of OraGI12Home1

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/orgrid/oracle/product/121_2 for the ASM instance.


Step 3.2: Switch GI/SIHA to run from cloned Oracle home on ohs2
Step 3.2.1: Update nodelist in the inventory for Grid Infrastructure Home


As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 CRS="false" -local


Step 3.2.2: Update nodelist in the inventory for Clone of OraGI12Home1


As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121_2/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 CRS="true" -local


Step 3.2.3: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 3.2.4: Stop the resources running from Database Home

On ohs2 stop the resources running out of the Database Home

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
rm -f /pgold/ordb/oracle/product/121/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255.stat

[oracle@ohs2]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl stop home -o /pgold/ordb/oracle/product/121 -n ohs2 -f -stopoption TRANSACTIONAL -s /pgold/ordb/oracle/product/121/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255.stat


Step 3.2.5: Switch stack to Clone of OraGI12Home1

This step initiates downtime, shuts down the GI stack running from the old Oracle home and restarts it from the new cloned home.

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -postpatch -dstcrshome /pgold/orgrid/oracle/product/121_2


Step 3.2.6: Start the resources running from Database Home

On ohs2 start the resources running out of the Database Home

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl start home -o /pgold/ordb/oracle/product/121 -n ohs2 -s /pgold/ordb/oracle/product/121/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255.stat


Step 3.2.7: Confirm that all resources have been started


As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121_2/bin/crsctl stat res -t


Step 3.2.8: Edit oratab add modified Clone of OraGI12Home1

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/orgrid/oracle/product/121_2 for the ASM instance.


Step 4: Modify cluster DB resources to run from cloned Oracle home (All services will be up)

Step 4.1: Modify cluster DB resources to run from cloned Oracle home on ohs1
Step 4.1.1: Confirm database is configured to use Database Home

Confirm database is configured to use original home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl config database -d prod -a


Step 4.1.2: Modify database to use Clone of OraDB12Home1

Modify database to use new home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121_2; /pgold/ordb/oracle/product/121_2/bin/srvctl modify database -d prod -o /pgold/ordb/oracle/product/121_2


Step 4.1.3: Confirm database is configured to use clone of Database Home

Confirm database is configured to use clone of Database Home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl config database -d prod -a


Step 5: Restart all DB instances (Limited services will be available)

Step 5.1: Restart all DB instances on ohs1
Step 5.1.1: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 5.1.2: Stop the database instance prod1


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl stop instance -d prod -i prod1


Step 5.1.3: Start the database instance prod1


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121_2; /pgold/ordb/oracle/product/121_2/bin/srvctl start instance -d prod -i prod1


Step 5.1.4: Discard PDB State

Discard PDB state

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121_2 ; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121_2/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 5.1.5: Start the DB Console process running from Clone of OraDB12Home1

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121_2/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121_2/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121_2/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 5.2: Restart all DB instances on ohs2
Step 5.2.1: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 5.2.2: Stop the database instance prod2


As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl stop instance -d prod -i prod2


Step 5.2.3: Start the database instance prod2


As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121_2; /pgold/ordb/oracle/product/121_2/bin/srvctl start instance -d prod -i prod2


Step 5.2.4: Discard PDB State

Discard PDB state

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121_2 ; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121_2/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 5.2.5: Start the DB Console process running from Clone of OraDB12Home1

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121_2/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121_2/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121_2/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 6: Apply SQL portion of the patch (All services will be up)

Step 6.1: Apply SQL portion of the patch on ohs1
Step 6.1.1: Apply SQL


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121_2 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121_2/OPatch/datapatch


Step 7: Fix dependent scripts (All services will be up)

Step 7.1: Fix dependent scripts on ohs1
Step 7.1.1: Edit oratab and add modified Clone of OraDB12Home1

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/ordb/oracle/product/121_2 for the database instance.


Step 7.1.2: Change scripts that have previous ORACLE_HOME configured

Change any scripts that may have the previous ORACLE_HOME configured inside the script. One example of this is the mount-dbfs.sh script from Note 1054431.1 if you are using DBFS.


Step 7.2: Fix dependent scripts on ohs2
Step 7.2.1: Edit oratab and add modified Clone of OraDB12Home1

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/ordb/oracle/product/121_2 for the database instance.


Step 7.2.2: Change scripts that have previous ORACLE_HOME configured

Change any scripts that may have the previous ORACLE_HOME configured inside the script. One example of this is the mount-dbfs.sh script from Note 1054431.1 if you are using DBFS.



Switchback to Old Home During Out of Place Patching

Important Note:

Summary: Steps for Switchback to Old Oracle Home



Detailed Switchback to Old Home Steps


Step 1: Switch GI/SIHA to run from original Oracle home (Limited services will be available)

Step 1.1: Switch GI/SIHA to run from original Oracle home on ohs1
Step 1.1.1: Update nodelist in the inventory for Clone of OraGI12Home1


As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121_2/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 CRS="false" -local


Step 1.1.2: Update nodelist in the inventory for Grid Infrastructure Home


As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 CRS="true" -local "CLUSTER_NODES={ohs1,ohs2}"


Step 1.1.3: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121_2 ; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121_2/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 1.1.4: Stop the resources running from Clone of OraDB12Home1

On ohs1 stop the resources running out of the Clone of OraDB12Home1

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
rm -f /pgold/ordb/oracle/product/121_2/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2_clone.stat

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121_2 /pgold/ordb/oracle/product/121_2/bin/srvctl stop home -o /pgold/ordb/oracle/product/121_2 -n ohs1 -f -stopoption TRANSACTIONAL -s /pgold/ordb/oracle/product/121_2/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2_clone.stat


Step 1.1.5: Stop the resources running from Database Home

On ohs1 stop the resources running out of the Database Home

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
rm -f /pgold/ordb/oracle/product/121/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2.stat

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl stop home -o /pgold/ordb/oracle/product/121 -n ohs1 -f -stopoption TRANSACTIONAL -s /pgold/ordb/oracle/product/121/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2.stat


Step 1.1.6: Unlock Clone of OraGI12Home1

Unlock new Oracle home using rootcrs.pl.

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -prepatch -rollback -dstcrshome /pgold/orgrid/oracle/product/121


Step 1.1.7: Switch stack to Clone of OraGI12Home1

This step initiates downtime, shuts down the GI stack running from the old Oracle home and restarts it from the new cloned home.

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -postpatch -rollback -dstcrshome /pgold/orgrid/oracle/product/121


Step 1.1.8: Start the resources running from Clone of OraDB12Home1

On ohs1 start the resources running out of the Clone of OraDB12Home1

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121_2 /pgold/ordb/oracle/product/121_2/bin/srvctl start home -o /pgold/ordb/oracle/product/121_2 -n ohs1 -s /pgold/ordb/oracle/product/121_2/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2_clone.stat


Step 1.1.9: Start the resources running from Database Home

On ohs1 start the resources running out of the Database Home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl start home -o /pgold/ordb/oracle/product/121 -n ohs1 -s /pgold/ordb/oracle/product/121/OracleHome-ff9bfa60-78ea-4b78-b675-c907520076a2.stat


Step 1.1.10: Confirm that all resources have been started


As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/bin/crsctl stat res -t


Step 1.1.11: Edit oratab add modified Grid Infrastructure Home

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/orgrid/oracle/product/121 for the ASM instance.


Step 1.2: Switch GI/SIHA to run from original Oracle home on ohs2
Step 1.2.1: Update nodelist in the inventory for Clone of OraGI12Home1


As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121_2/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121_2 CRS="false" -local


Step 1.2.2: Update nodelist in the inventory for Grid Infrastructure Home


As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 CRS="true" -local "CLUSTER_NODES={ohs1,ohs2}"


Step 1.2.3: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121_2 ; ORACLE_HOME=/pgold/ordb/oracle/product/121_2 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121_2/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 1.2.4: Stop the resources running from Clone of OraDB12Home1

On ohs2 stop the resources running out of the Clone of OraDB12Home1

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
rm -f /pgold/ordb/oracle/product/121_2/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255_clone.stat

[oracle@ohs2]$
ORACLE_HOME=/pgold/ordb/oracle/product/121_2 /pgold/ordb/oracle/product/121_2/bin/srvctl stop home -o /pgold/ordb/oracle/product/121_2 -n ohs2 -f -stopoption TRANSACTIONAL -s /pgold/ordb/oracle/product/121_2/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255_clone.stat


Step 1.2.5: Stop the resources running from Database Home

On ohs2 stop the resources running out of the Database Home

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
rm -f /pgold/ordb/oracle/product/121/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255.stat

[oracle@ohs2]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl stop home -o /pgold/ordb/oracle/product/121 -n ohs2 -f -stopoption TRANSACTIONAL -s /pgold/ordb/oracle/product/121/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255.stat


Step 1.2.6: Unlock Clone of OraGI12Home1

Unlock new Oracle home using rootcrs.pl.

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -prepatch -rollback -dstcrshome /pgold/orgrid/oracle/product/121


Step 1.2.7: Switch stack to Clone of OraGI12Home1

This step initiates downtime, shuts down the GI stack running from the old Oracle home and restarts it from the new cloned home.

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121_2/perl/bin/perl -I/pgold/orgrid/oracle/product/121_2/perl/lib -I/pgold/orgrid/oracle/product/121_2/crs/install /pgold/orgrid/oracle/product/121_2/crs/install/rootcrs.pl -postpatch -rollback -dstcrshome /pgold/orgrid/oracle/product/121


Step 1.2.8: Start the resources running from Clone of OraDB12Home1

On ohs2 start the resources running out of the Clone of OraDB12Home1

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
ORACLE_HOME=/pgold/ordb/oracle/product/121_2 /pgold/ordb/oracle/product/121_2/bin/srvctl start home -o /pgold/ordb/oracle/product/121_2 -n ohs2 -s /pgold/ordb/oracle/product/121_2/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255_clone.stat


Step 1.2.9: Start the resources running from Database Home

On ohs2 start the resources running out of the Database Home

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 /pgold/ordb/oracle/product/121/bin/srvctl start home -o /pgold/ordb/oracle/product/121 -n ohs2 -s /pgold/ordb/oracle/product/121/OracleHome-bc066612-f06a-4479-a64c-ec07a86cb255.stat


Step 1.2.10: Confirm that all resources have been started


As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/bin/crsctl stat res -t


Step 1.2.11: Edit oratab add modified Grid Infrastructure Home

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/orgrid/oracle/product/121 for the ASM instance.


Step 2: Modify cluster DB resources to run from original Oracle home (All services will be up)

Step 2.1: Modify cluster DB resources to run from original Oracle home on ohs1
Step 2.1.1: Update nodelist in the inventory for Database Home


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/ordb/oracle/product/121 -local "CLUSTER_NODES={ohs1,ohs2}"


Step 2.1.2: Confirm database is configured to use Clone of OraDB12Home1

Confirm database is configured to use new cloned home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121_2; /pgold/ordb/oracle/product/121_2/bin/srvctl config database -d prod -a


Step 2.1.3: Modify database to use Database Home

Modify database to use new home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl modify database -d prod -o /pgold/ordb/oracle/product/121


Step 2.1.4: Confirm database is configured to use Database Home

Confirm database is configured to use original home

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl config database -d prod -a


Step 2.2: Modify cluster DB resources to run from original Oracle home on ohs2
Step 2.2.1: Update nodelist in the inventory for Database Home


As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/ordb/oracle/product/121 -local "CLUSTER_NODES={ohs1,ohs2}"


Step 3: Restart all DB instances from original Oracle home (Limited services will be available)

Step 3.1: Restart all DB instances from original Oracle home on ohs1
Step 3.1.1: Stop the DB Console process running from Clone of OraDB12Home1

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121_2/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121_2/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121_2/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 3.1.2: Stop the database instance prod1


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121_2; /pgold/ordb/oracle/product/121_2/bin/srvctl stop instance -d prod -i prod1


Step 3.1.3: Start the database instance prod1


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl start instance -d prod -i prod1


Step 3.1.4: Discard PDB State

Discard PDB state

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 3.1.5: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 3.2: Restart all DB instances from original Oracle home on ohs2
Step 3.2.1: Stop the DB Console process running from Clone of OraDB12Home1

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121_2/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121_2/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121_2/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 3.2.2: Stop the database instance prod2


As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121_2; /pgold/ordb/oracle/product/121_2/bin/srvctl stop instance -d prod -i prod2


Step 3.2.3: Start the database instance prod2


As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
export ORACLE_HOME=/pgold/ordb/oracle/product/121; /pgold/ordb/oracle/product/121/bin/srvctl start instance -d prod -i prod2


Step 3.2.4: Discard PDB State

Discard PDB state

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 3.2.5: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 4: Revert SQL portion of the patch and reapply original SQL changes (All services will be up)

Step 4.1: Revert SQL portion of the patch and reapply original SQL changes on ohs1
Step 4.1.1: Rollback SQL changes applied during clone and patch

SQL changes applied during patch application time from the cloned home need to be rolled back from the database.
Execute the following command to rollback the SQL changes.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/OPatch/datapatch -oh /pgold/ordb/oracle/product/121_2


Step 4.1.2: Restore SQL changes prior to clone and patch

SQL changes present in the database prior to clone and patch need to be restored back.
Execute the following command to restore the SQL changes.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/OPatch/datapatch


Step 5: Fix dependent scripts (All services will be up)

Step 5.1: Fix dependent scripts on ohs1
Step 5.1.1: Edit oratab and add modified Database Home

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/ordb/oracle/product/121 for the database instance.


Step 5.1.2: Change scripts that have previous ORACLE_HOME configured

Change any scripts that may have the previous ORACLE_HOME configured inside the script. One example of this is the mount-dbfs.sh script from Note 1054431.1 if you are using DBFS.


Step 5.2: Fix dependent scripts on ohs2
Step 5.2.1: Edit oratab and add modified Database Home

Edit /etc/oratab (on Linux or AIX) or /var/opt/oracle/oratab (on Solaris) and set the newly modified Oracle Home /pgold/ordb/oracle/product/121 for the database instance.


Step 5.2.2: Change scripts that have previous ORACLE_HOME configured

Change any scripts that may have the previous ORACLE_HOME configured inside the script. One example of this is the mount-dbfs.sh script from Note 1054431.1 if you are using DBFS.



Apply Patch In-Place using OPatch Auto Command in Rolling Mode

Important Note:

Summary: Steps for OPatch Auto Patch Apply



Detailed OPatch Auto Apply Steps


Step 1: Patch Pre-Apply Phase (All services will be up)

Step 1.1: Patch Pre-Apply Phase on ohs1
Step 1.1.1: Perform Configuration Compare

This step ensures that the steps generated are up-to-date for the current system configuration.
Perform comparison of the configuration XML with the current system configuration.

If the message displayed is The two system configurations are same., continue patching following the steps given.

If the message displayed is The two system configurations are different. , regenerate the patching steps by running oplan again.

As the root user on the host ohs1 run the following command:

[root@ohs1]#
ORACLE_HOME=/pgold/orgrid/oracle/product/121 /pgold/orgrid/oracle/product/121/OPatch/oplan/../auto/core/bin/oplan.sh configurationCompare /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/2017-01-03-19-56-31/machine-readable/configData.xml


Step 1.1.2: Copy all patches to ohs1

Make sure the patch(es) 24448103 is present on node ohs1 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs1 at the above location while logged in as the owner of your grid infrastructure home.


Step 1.1.3: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.1.4: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.1.5: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.1.6: Copy response file to Grid Infrastructure Home/ocm.rsp

Copy response file /pgold/orgrid/oracle/product/121/ocm.rsp to Grid Infrastructure Homeocm.rsp

As the root user on the host ohs1 run the following command:

[root@ohs1]#
cp /tmp/ocm.rsp /pgold/orgrid/oracle/product/121/ocm.rsp


Step 1.1.7: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.8: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.9: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.10: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.11: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.12: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.13: Run OPatch System Space Check for Database Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121/cfgtoollogs/oplan

[oracle@ohs1]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc


Step 1.1.14: Run OPatch System Space Check for Grid Infrastructure Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan

[orgrid@ohs1]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc


Step 1.2: Patch Pre-Apply Phase on ohs2
Step 1.2.1: Copy all patches to ohs2

Make sure the patch(es) 24448103 is present on node ohs2 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs2 at the above location while logged in as the owner of your grid infrastructure home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p /mnt

[orgrid@ohs2]$
scp -r ohs1:/mnt/24448103 /mnt/24448103


Step 1.2.2: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.2.3: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.2.4: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.2.5: Copy response file to Grid Infrastructure Home/ocm.rsp

Copy response file /pgold/orgrid/oracle/product/121/ocm.rsp to Grid Infrastructure Homeocm.rsp

As the root user on the host ohs2 run the following command:

[root@ohs2]#
cp /tmp/ocm.rsp /pgold/orgrid/oracle/product/121/ocm.rsp


Step 1.2.6: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.7: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.8: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.9: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.10: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.11: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.12: Run OPatch System Space Check for Database Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121/cfgtoollogs/oplan

[oracle@ohs2]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc


Step 1.2.13: Run OPatch System Space Check for Grid Infrastructure Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan

[orgrid@ohs2]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc


Step 2: Patch Apply Phase (Limited services will be available)

Step 2.1: Patch Apply Phase on ohs1
Step 2.1.1: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.1.2: Run OPatch auto to shutdown services, apply patch and start services

Running the following OPatch auto command will shutdown all the services running out of both Grid Infrastructure home and Database homes, apply the patch on *all the homes* and bring all the services back up.

Important Note: OPatch auto does not support reboot patch for now. If the command fails and the log shows error "CLSRSC-400: A system reboot is required to continue installing", reboot the host and refer the manual instructions for continuing with patching.


As the root user on the host ohs1 run the following command:

[root@ohs1]#
export ORACLE_HOME=/pgold/orgrid/oracle/product/121; /pgold/orgrid/oracle/product/121/OPatch/opatchauto apply /mnt/24448103 -ocmrf /pgold/orgrid/oracle/product/121/ocm.rsp


Step 2.1.3: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.2: Patch Apply Phase on ohs2
Step 2.2.1: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.2.2: Run OPatch auto to shutdown services, apply patch and start services

Running the following OPatch auto command will shutdown all the services running out of both Grid Infrastructure home and Database homes, apply the patch on *all the homes* and bring all the services back up.

Important Note: OPatch auto does not support reboot patch for now. If the command fails and the log shows error "CLSRSC-400: A system reboot is required to continue installing", reboot the host and refer the manual instructions for continuing with patching.


As the root user on the host ohs2 run the following command:

[root@ohs2]#
export ORACLE_HOME=/pgold/orgrid/oracle/product/121; /pgold/orgrid/oracle/product/121/OPatch/opatchauto apply /mnt/24448103 -ocmrf /pgold/orgrid/oracle/product/121/ocm.rsp


Step 2.2.3: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi



Apply Patch In-Place using OPatch Command in Rolling Mode

Important Note:

Summary: Steps for Manual Patch Apply



Detailed Manual Patch Apply Steps


Step 1: Patch Pre-Apply Phase (All services will be up)

Step 1.1: Patch Pre-Apply Phase on ohs1
Step 1.1.1: Perform Configuration Compare

This step ensures that the steps generated are up-to-date for the current system configuration.
Perform comparison of the configuration XML with the current system configuration.

If the message displayed is The two system configurations are same., continue patching following the steps given.

If the message displayed is The two system configurations are different. , regenerate the patching steps by running oplan again.

As the root user on the host ohs1 run the following command:

[root@ohs1]#
ORACLE_HOME=/pgold/orgrid/oracle/product/121 /pgold/orgrid/oracle/product/121/OPatch/oplan/../auto/core/bin/oplan.sh configurationCompare /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/2017-01-03-19-56-31/machine-readable/configData.xml


Step 1.1.2: Copy all patches to ohs1

Make sure the patch(es) 24448103 is present on node ohs1 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs1 at the above location while logged in as the owner of your grid infrastructure home.


Step 1.1.3: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.1.4: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.1.5: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.1.6: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.7: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.8: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.9: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.10: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.1.11: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.1.12: Run OPatch System Space Check for Grid Infrastructure Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan

[orgrid@ohs1]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc


Step 1.1.13: Run OPatch System Space Check for Database Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121/cfgtoollogs/oplan

[oracle@ohs1]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc


Step 1.2: Patch Pre-Apply Phase on ohs2
Step 1.2.1: Copy all patches to ohs2

Make sure the patch(es) 24448103 is present on node ohs2 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs2 at the above location while logged in as the owner of your grid infrastructure home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p /mnt

[orgrid@ohs2]$
scp -r ohs1:/mnt/24448103 /mnt/24448103


Step 1.2.2: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.2.3: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.2.4: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.2.5: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.6: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.7: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.8: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.9: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.2.10: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.2.11: Run OPatch System Space Check for Grid Infrastructure Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan

[orgrid@ohs2]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc


Step 1.2.12: Run OPatch System Space Check for Database Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121/cfgtoollogs/oplan

[oracle@ohs2]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc


Step 2: Patch Apply Phase (Limited services will be available)

Step 2.1: Patch Apply Phase on ohs1
Step 2.1.1: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.1.2: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.1.3: Run rootcrs.pl -prepatch

As a 'root' user, run rootcrs.pl -prepatch

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -prepatch


Step 2.1.4: Apply Patch to Database Home

On ohs1 Apply the patch to Database Home

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/mnt/24448103/24846605/custom/scripts/prepatch.sh -dbhome /pgold/ordb/oracle/product/121

[oracle@ohs1]$
echo /mnt/24448103/24340679 > /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs1]$
echo /mnt/24448103/24846605 >> /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraDB12Home1_oracle_patchList -local -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121 -ocmrf /tmp/ocm.rsp

[oracle@ohs1]$
/mnt/24448103/24846605/custom/scripts/postpatch.sh -dbhome /pgold/ordb/oracle/product/121


Step 2.1.5: Apply Patch to Grid Infrastructure Home

On ohs1 Apply the patch to Grid Infrastructure Home

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
echo /mnt/24448103/21436941 > /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24007012 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24340679 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24846605 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraGI12Home1_orgrid_patchList -local -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121 -ocmrf /tmp/ocm.rsp


Step 2.1.6: Run rootadd_rdbms.sh

As a 'root' user, run rootadd_rdbms.sh

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121/rdbms/install/rootadd_rdbms.sh


Step 2.1.7: Run rootcrs.pl -postpatch

As a 'root' user, run rootcrs.pl -postpatch

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -postpatch


Step 2.1.8: Discard PDB State

Discard PDB state

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.1.9: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.2: Patch Apply Phase on ohs2
Step 2.2.1: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.2.2: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.2.3: Run rootcrs.pl -prepatch

As a 'root' user, run rootcrs.pl -prepatch

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -prepatch


Step 2.2.4: Apply Patch to Database Home

On ohs2 Apply the patch to Database Home

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/mnt/24448103/24846605/custom/scripts/prepatch.sh -dbhome /pgold/ordb/oracle/product/121

[oracle@ohs2]$
echo /mnt/24448103/24340679 > /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs2]$
echo /mnt/24448103/24846605 >> /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraDB12Home1_oracle_patchList -local -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121 -ocmrf /tmp/ocm.rsp

[oracle@ohs2]$
/mnt/24448103/24846605/custom/scripts/postpatch.sh -dbhome /pgold/ordb/oracle/product/121


Step 2.2.5: Apply Patch to Grid Infrastructure Home

On ohs2 Apply the patch to Grid Infrastructure Home

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
echo /mnt/24448103/21436941 > /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24007012 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24340679 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24846605 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraGI12Home1_orgrid_patchList -local -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121 -ocmrf /tmp/ocm.rsp


Step 2.2.6: Run rootadd_rdbms.sh

As a 'root' user, run rootadd_rdbms.sh

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121/rdbms/install/rootadd_rdbms.sh


Step 2.2.7: Run rootcrs.pl -postpatch

As a 'root' user, run rootcrs.pl -postpatch

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -postpatch


Step 2.2.8: Discard PDB State

Discard PDB state

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.2.9: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 3: Post Patch Apply Phase (All services will be up)

Step 3.1: Post Patch Apply Phase on ohs1
Step 3.1.1: Apply SQL


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/OPatch/datapatch



Apply Patch In-Place using OPatch Command in Non-rolling Mode

Important Note:

Summary: Steps for Manual Patch Apply



Detailed Manual Patch Apply Steps


Step 1: Patch Pre-Apply Phase (All services will be up)

Step 1.1: Perform Configuration Compare

This step ensures that the steps generated are up-to-date for the current system configuration.
Perform comparison of the configuration XML with the current system configuration.

If the message displayed is The two system configurations are same., continue patching following the steps given.

If the message displayed is The two system configurations are different. , regenerate the patching steps by running oplan again.

As the root user on the host ohs1 run the following command:

[root@ohs1]#
ORACLE_HOME=/pgold/orgrid/oracle/product/121 /pgold/orgrid/oracle/product/121/OPatch/oplan/../auto/core/bin/oplan.sh configurationCompare /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/2017-01-03-19-56-31/machine-readable/configData.xml


Step 1.2: Copy all patches to ohs1

Make sure the patch(es) 24448103 is present on node ohs1 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs1 at the above location while logged in as the owner of your grid infrastructure home.


Step 1.3: Copy all patches to ohs2

Make sure the patch(es) 24448103 is present on node ohs2 at location /mnt/24448103. If not, copy the patch(es) 24448103 to node ohs2 at the above location while logged in as the owner of your grid infrastructure home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p /mnt

[orgrid@ohs2]$
scp -r ohs1:/mnt/24448103 /mnt/24448103


Step 1.4: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.5: Run Check OPatch Version on Database Home

Make sure the Oracle Home OraDB12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch version -oh /pgold/ordb/oracle/product/121 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.6: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.7: Run Check OPatch Version on Grid Infrastructure Home

Make sure the Oracle Home OraGI12Home1 has opatch version at least 11.1.0.9.0 or higher.
If any of the homes do not satisfy, download the latest version of OPatch and install it in the Oracle Home.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch version -oh /pgold/orgrid/oracle/product/121 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -v2c 12.1.0.1.7


Step 1.8: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.9: Generate response file to configure OCM

If OCM (Oracle Configuration Manager) is not installed and configured in the Oracle Home, OPatch will attempt to do it during patch apply and rollback operations.
This step will create an OCM response file that will be used during apply and rollback operations.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/ocm/bin/emocmrsp -output /tmp/ocm.rsp


Step 1.10: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.11: Run OPatch Inventory Check for Database Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.12: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs1 run the following command:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.13: Run OPatch Inventory Check for Grid Infrastructure Home

To check the consistency of inventory information, run the OPatch lsinventory command and look for "OPatch succeeded" message at the end.

As the orgrid user on the host ohs2 run the following command:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch lsinventory -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.14: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.15: Run OPatch Component Check for Database Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.16: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.17: Run OPatch Component Check for Grid Infrastructure Home

Run OPatch component check command and make sure that the output confirms that the patch is applicable to the home.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckComponents -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.18: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.19: Run OPatch Conflict Check for Database Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121


Step 1.20: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.21: Run OPatch Conflict Check for Grid Infrastructure Home

Run OPatch conflict check command and make sure that the output confirms that the patch is applicable to the home without any conflict.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/21436941 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24007012 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24340679 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckConflictAgainstOH -ph /mnt/24448103/24846605 -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121


Step 1.22: Run OPatch System Space Check for Grid Infrastructure Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan

[orgrid@ohs1]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc


Step 1.23: Run OPatch System Space Check for Grid Infrastructure Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
mkdir -p -m 775 /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan

[orgrid@ohs2]$
echo /mnt/24448103/21436941 > /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24007012 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24340679 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/orgrid_24448103_phBaseFile_patchList -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc


Step 1.24: Run OPatch System Space Check for Database Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121/cfgtoollogs/oplan

[oracle@ohs1]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc


Step 1.25: Run OPatch System Space Check for Database Home

Run OPatch system space check command and make sure that the system has enough space to apply the patch.

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
mkdir -p -m 775 /pgold/ordb/oracle/product/121/cfgtoollogs/oplan

[oracle@ohs2]$
echo /mnt/24448103/24340679 > /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
echo /mnt/24448103/24846605 >> /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch prereq CheckSystemSpace -phBaseFile /pgold/ordb/oracle/product/121/cfgtoollogs/oplan/oracle_24448103_phBaseFile_patchList -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc


Step 2: Patch Apply Phase (All services will be down)

Step 2.1: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.2: Stop the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you must stop it prior to patching the Oracle database home or GI Home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl stop dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.3: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.4: Save PDB Status

Save PDB state before stopping database

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL SAVE STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.5: Shutdown Clusterware

Shutdown Clusterware daemons as a 'root' user.

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121/bin/crsctl stop crs


Step 2.6: Run rootcrs.pl -prepatch

As a 'root' user, run rootcrs.pl -prepatch

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -prepatch -nonrolling


Step 2.7: Run rootcrs.pl -prepatch

As a 'root' user, run rootcrs.pl -prepatch

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -prepatch -nonrolling


Step 2.8: Apply Patch to Database Home

On ohs1 Apply the patch to Database Home

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
/mnt/24448103/24846605/custom/scripts/prepatch.sh -dbhome /pgold/ordb/oracle/product/121

[oracle@ohs1]$
echo /mnt/24448103/24340679 > /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs1]$
echo /mnt/24448103/24846605 >> /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs1]$
/pgold/ordb/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraDB12Home1_oracle_patchList -local -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121 -ocmrf /tmp/ocm.rsp

[oracle@ohs1]$
/mnt/24448103/24846605/custom/scripts/postpatch.sh -dbhome /pgold/ordb/oracle/product/121


Step 2.9: Apply Patch to Database Home

On ohs2 Apply the patch to Database Home

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
/mnt/24448103/24846605/custom/scripts/prepatch.sh -dbhome /pgold/ordb/oracle/product/121

[oracle@ohs2]$
echo /mnt/24448103/24340679 > /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs2]$
echo /mnt/24448103/24846605 >> /tmp/OraDB12Home1_oracle_patchList

[oracle@ohs2]$
/pgold/ordb/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraDB12Home1_oracle_patchList -local -invPtrLoc /pgold/ordb/oracle/product/121/oraInst.loc -oh /pgold/ordb/oracle/product/121 -ocmrf /tmp/ocm.rsp

[oracle@ohs2]$
/mnt/24448103/24846605/custom/scripts/postpatch.sh -dbhome /pgold/ordb/oracle/product/121


Step 2.10: Apply Patch to Grid Infrastructure Home

On ohs1 Apply the patch to Grid Infrastructure Home

As the orgrid user on the host ohs1 run the following commands:

[orgrid@ohs1]$
echo /mnt/24448103/21436941 > /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24007012 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24340679 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
echo /mnt/24448103/24846605 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs1]$
/pgold/orgrid/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraGI12Home1_orgrid_patchList -local -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121 -ocmrf /tmp/ocm.rsp


Step 2.11: Apply Patch to Grid Infrastructure Home

On ohs2 Apply the patch to Grid Infrastructure Home

As the orgrid user on the host ohs2 run the following commands:

[orgrid@ohs2]$
echo /mnt/24448103/21436941 > /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24007012 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24340679 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
echo /mnt/24448103/24846605 >> /tmp/OraGI12Home1_orgrid_patchList

[orgrid@ohs2]$
/pgold/orgrid/oracle/product/121/OPatch/opatch napply -phBaseFile /tmp/OraGI12Home1_orgrid_patchList -local -invPtrLoc /pgold/orgrid/oracle/product/121/oraInst.loc -oh /pgold/orgrid/oracle/product/121 -ocmrf /tmp/ocm.rsp


Step 2.12: Run rootadd_rdbms.sh

As a 'root' user, run rootadd_rdbms.sh

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121/rdbms/install/rootadd_rdbms.sh


Step 2.13: Run rootadd_rdbms.sh

As a 'root' user, run rootadd_rdbms.sh

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121/rdbms/install/rootadd_rdbms.sh


Step 2.14: Run rootcrs.pl -postpatch

As a 'root' user, run rootcrs.pl -postpatch

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs1 run the following command:

[root@ohs1]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -postpatch -nonrolling


Step 2.15: Run rootcrs.pl -postpatch

As a 'root' user, run rootcrs.pl -postpatch

Important Note: If the command fails with following error messages, reboot the host and re-try the same step.
CLSRSC-400: A system reboot is required to continue installing

As the root user on the host ohs2 run the following command:

[root@ohs2]#
/pgold/orgrid/oracle/product/121/perl/bin/perl -I/pgold/orgrid/oracle/product/121/perl/lib -I/pgold/orgrid/oracle/product/121/crs/install /pgold/orgrid/oracle/product/121/crs/install/rootcrs.pl -postpatch -nonrolling


Step 2.16: Discard PDB State

Discard PDB state

As the oracle user on the host ohs1 run the following commands:

[oracle@ohs1]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.17: Discard PDB State

Discard PDB state

As the oracle user on the host ohs2 run the following commands:

[oracle@ohs2]$
cd /pgold/ordb/oracle/product/121 ; ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod2 /pgold/ordb/oracle/product/121/bin/sqlplus / as sysdba

SQLPLUS>
DECLARE l_count NUMBER(4) :=0; BEGIN SELECT count(*) INTO l_count FROM CDB_PDBS; IF l_count >1 then EXECUTE IMMEDIATE 'alter pluggable database ALL DISCARD STATE'; END IF; commit; END;

SQLPLUS>
/


Step 2.18: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs1*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs1*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 2.19: Start the DB Console process running from Database Home

If you use DB Console to monitor the DB instances, you may start it now from the database home.

If you are not using DB Console, you may skip this step or ignore the error message while executing this command.

As the oracle user on the host ohs2 run the following command:

[oracle@ohs2]$
if [ -d $(echo /pgold/ordb/oracle/product/121/oc4j/j2ee/OC4J_DBConsole_ohs2*_prod) -a -d $(echo /pgold/ordb/oracle/product/121/ohs2*_prod) ]; then export ORACLE_UNQNAME=prod; /pgold/ordb/oracle/product/121/bin/emctl start dbconsole; else echo 'dbconsole not configured, hence skipping this step.'; fi


Step 3: Post Patch Apply Phase (All services will be up)

Step 3.1: Post Patch Apply Phase on ohs1
Step 3.1.1: Apply SQL


As the oracle user on the host ohs1 run the following command:

[oracle@ohs1]$
ORACLE_HOME=/pgold/ordb/oracle/product/121 ORACLE_SID=prod1 /pgold/ordb/oracle/product/121/OPatch/datapatch



Appendix A: Patch Readme

The patch README (shown below) is located at /pgold/orgrid/oracle/product/121/cfgtoollogs/oplan/2017-01-03-19-56-31/README.html on host ohs1.