Uncategorized

Exadata Bundle Patching using Oplan utility

What is oplan?

Oplan utility helps you generate step by step patching instructions for your environment. Traditionally the patches are applied by using steps provided in the README file that comes with the patch.Oplan utility automatically generates the patching steps based on the target configuration information. It provides both patching and rollback steps and provides multiple patching options such as In-place and out-of-place methods.

Download oplan utility?

Download OPlan from My Oracle Support (https://support.oracle.com).
Search for patch 6880880 and download.



More on oplan utility
Oracle Software Patching with OPLAN (Doc ID 1306814.1)   

In this article I will demonstrate how to download and generate patching steps using oplan utility.

oplan Steps
Patching with oplan utility consists of following steps

  • Install oplan utility
  • Generate patching steps
  • Apply the patch
  • Rollback the patch

Install oplan utility 
  • Steps to download oplan and latest Exadata Bundle Patch (QDPE)
Note: In this article I am using oplan/opatch version 12.2.0.1.8 and BP October 2016 (24968615) for demonstration purpose.

 









For downloading oplan:

  • Copy these patch using WINSCP to Node 1 (dm01db01) under /u01/app/oracle/software/bundle_patch

dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:ls -ltr
total 2099896
-rw-r–r– 1 oracle oinstall   79808592 Jan 18 07:10 p6880880_122010_Linux-x86-64.zip
-rw-r–r– 1 oracle oinstall 2068366687 Jan 18 09:48 p24968615_121020_Linux-x86-64.zip

  • Use dcli utility distribute OPLAN patche to all the nodes under /u01/app/oracle/software/bundle_patch/bundle_patch directory.

dm01db01-orcldb1 {/u01/app/oracle/software}:dcli -g ~/dbs_group -l oracle ‘cd /u01/app/oracle/software; mkdir bundle_patch’
 
dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g ~/dbs_group -l oracle -d /u01/app/oracle/software/bundle_patch -f p6880880_122010_Linux-x86-64.zip

dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g ~/dbs_group -l oracle ls -l /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db01: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db02: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db03: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db04: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db05: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db06: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db07: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip
dm01db08: -rw-r–r– 1 oracle oinstall 79808592 Jan 23 07:40 /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip

  • Get the current opatch and oplan version
RDBMS:

dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version’
dm01db01: OPatch Version: 12.2.0.1.8
dm01db01:
dm01db01: OPatch succeeded.
dm01db02: OPatch Version: 11.2.0.3.15
dm01db02:
dm01db02: OPatch succeeded.
dm01db03: OPatch Version: 11.2.0.3.15
dm01db03:
dm01db03: OPatch succeeded.
dm01db04: OPatch Version: 11.2.0.3.15
dm01db04:
dm01db04: OPatch succeeded.
dm01db05: OPatch Version: 11.2.0.3.15
dm01db05:
dm01db05: OPatch succeeded.
dm01db06: OPatch Version: 11.2.0.3.15
dm01db06:
dm01db06: OPatch succeeded.
dm01db07: OPatch Version: 11.2.0.3.15
dm01db07:
dm01db07: OPatch succeeded.
dm01db08: OPatch Version: 11.2.0.3.15
dm01db08:
dm01db08: OPatch succeeded.


dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan  -v’
dm01db01: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
dm01db01: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128M; support was removed in 8.0
dm01db01:
dm01db01: oplan version: 12.2.0.1.8
dm01db01:
dm01db01: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
dm01db01: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
dm01db01:
dm01db02: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
dm01db02:
dm01db02: oplan version: 12.2.0.1.7
dm01db02:
dm01db02: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
dm01db02: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
dm01db02:
dm01db08: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
dm01db08:
dm01db08: oplan version: 12.2.0.1.7
dm01db08:
dm01db08: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
dm01db08: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
dm01db08:


GRID:

dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version’
dm01db01: OPatch Version: 12.2.0.1.8
dm01db01:
dm01db01: OPatch succeeded.
dm01db02: OPatch Version: 11.2.0.3.15
dm01db02:
dm01db02: OPatch succeeded.
dm01db03: OPatch Version: 11.2.0.3.15
dm01db03:
dm01db03: OPatch succeeded.
dm01db04: OPatch Version: 11.2.0.3.15
dm01db04:
dm01db04: OPatch succeeded.
dm01db05: OPatch Version: 11.2.0.3.15
dm01db05:
dm01db05: OPatch succeeded.
dm01db06: OPatch Version: 11.2.0.3.15
dm01db06:
dm01db06: OPatch succeeded.
dm01db07: OPatch Version: 11.2.0.3.15
dm01db07:
dm01db07: OPatch succeeded.
dm01db08: OPatch Version: 11.2.0.3.15
dm01db08:
dm01db08: OPatch succeeded.


dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan -v’
dm01db01: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
dm01db01:
dm01db01: oplan version: 12.2.0.1.7
dm01db01:
dm01db01: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
dm01db01: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
dm01db01:
dm01db02: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
dm01db02:
dm01db02: oplan version: 12.2.0.1.7
dm01db02:
dm01db02: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
dm01db02: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
dm01db02:

dm01db08: from oplan /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar
dm01db08:
dm01db08: oplan version: 12.2.0.1.7
dm01db08:
dm01db08: Minimum OPatch version required for 11.2 targets: 11.2.0.3.0
dm01db08: Minimum OPatch version required for 12.1 targets: 12.1.0.1.0
dm01db08:
dm01db01-orcldb1 {/home/oracle}:

  • Unzip OPATCH under ORACLE_HOME and GRID_HOME
RDBMS:
 
dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g dbs_group -l oracle ‘unzip -o /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0.2/dbhome’

GRID:
 
dm01db01-orcldb1 {/u01/app/oracle/software/bundle_patch}:dcli -g dbs_group -l oracle ‘unzip -o /u01/app/oracle/software/bundle_patch/p6880880_122010_Linux-x86-64.zip -d /u01/app/12.1.0.2/grid’

  • Verify both OPATCH and OPLAN are upgraded to the latest version
dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version | grep “OPatch Version”‘

dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/12.1.0.2/grid; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan -v | grep -i “oplan version”‘


dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/oplan/oplan  -v | grep -i “oplan version”‘

dm01db01-orcldb1 {/home/oracle}:dcli -g ~/dbs_group -l oracle ‘export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/dbhome; /u01/app/oracle/product/12.1.0.2/dbhome/OPatch/opatch version | grep -i “opatch version”‘


Generate patching steps
  • Set the oracle home to GRID_HOME and run the oplan to generate apply steps for patching October 2016 BP

dm01db01-orcldb1 {/home/oracle}:. oraenv
ORACLE_SID = [orcldb1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle

dm01db01-+ASM1 {/home/oracle}:echo $ORACLE_SID
+ASM1

dm01db01-+ASM1 {/home/oracle}:echo $ORACLE_HOME
/u01/app/12.1.0.2/grid

dm01db01-+ASM1 {/home/oracle}:cd /u01/app/oracle/software/bundle_patch/

dm01db01-+ASM1 {/u01/app/oracle/software/bundle_patch}:ls -ltr
total 2099896
-rw-r–r– 1 oracle oinstall 2068366687 Jan 18 09:48 p24968615_121020_Linux-x86-64.zip
-rw-r–r– 1 oracle oinstall   79808592 Jan 23 07:40 p6880880_122010_Linux-x86-64.zip

dm01db01-+ASM1 {/u01/app/oracle/software/bundle_patch}:unzip p24968615_121020_Linux-x86-64.zip

dm01db01-+ASM1 {/u01/app/oracle/software/bundle_patch}:$ORACLE_HOME/OPatch/oplan/oplan generateApplySteps /u01/app/oracle/software/bundle_patch/24968615
 
from oplan /u01/app/11.2.0.4/grid/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.oplan.core.classpath.jar:/u01/app/11.2.0.4/grid/OPatch/oplan/../auto/core/bin/../../core/modules/features/oracle.glcm.osys.core.classpath.jar:/u01/app/11.2.0.4/grid/OPatch/oplan/../auto/core/bin/../../database/modules/oplan_db.jar


Processing request…


Review the log messages captured in the following file:

/u01/app/11.2.0.4/grid/cfgtoollogs/oplan/2017-05-28-10-28-46/log.txt



Success!

Follow the instructions outlined in the following Installation Instructions document and

patch your system:

Apply Instructions (HTML)    : /u01/app/11.2.0.4/grid/cfgtoollogs/oplan/2017-05-28-10-28-46/ApplyInstructions.html
Apply Instructions (TEXT)    : /u01/app/11.2.0.4/grid/cfgtoollogs/oplan/2017-05-28-10-28-46/ApplyInstructions.txt

  • The patch installation instructions specific to your target will be available as HTML and text format in these locations:

Apply the patch
  • Choose the patching method based on the downtime and business requirement.
  • Follow the patching steps and apply the patch to the target environment.

Rollback the patch
  • Follow the rollback step to rollback the patch from the target environment.

Oplan Limitations:
  • Data Guard configurations are not supported.
  • Shared Oracle Home Configurations are not supported.
  • Single Instance Databases running in the same configuration are not supported

Conclusion:
In this article we have learned how oplan utility is used to generate patching steps. oplan makes patching simple and easy by generating step by step patching instructions. It offer multiple patching strategies such as In-place and Out-of-Place patching methods.