In this post, I will walk through the steps to apply the January 2016 PSU to the latest release of Oracle (12.1.0.2). In this post, we will apply Patch 22191349 – Oracle Grid Infrastructure Patch Set Update 12.1.0.2.160119 (Jan2016) to both the Grid Infrastructure and Oracle Database Home.

Notes:
1. From CPUJan2016 onwards, the 5th digit of the version number will be changed to reflect the release date in the format YYMMDD. See My Oracle Support Document 2061926.1 for more information.
2. The GI System patch includes updates for both the Clusterware home and Database home that can be applied in a rolling fashion.

This patch is Data Guard Standby First Installable – See Section 2.5, “Installing Database PSU in Standby-First Mode” for more information.

In our example, we did not create any databases prior to applying the PSU. This will a typical installation method for Viscosity consultants where we will create a custom database leveraging dbca.

In general, when we invoke opatchauto, opatch will patch both the GI stack and the database software stack. Since we do not have a database running, patch will skip the database software stack and only apply the PSU to the GI Home. Before we invoke the opatchauto command, let’s create the ocm.rsp response file by executing the OCM Installation Response Generator (emocmrsp).

[root@vnarac01 ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle
[root@vnarac01 ~]# 
[root@vnarac01 ~]# 
[root@vnarac01 ~]# export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
[root@vnarac01 ~]# opatchauto apply /u01/app/oracle/soft/22191349 -ocmrf /tmp/ocm.rsp
OPatch Automation Tool
Copyright (c)2014, Oracle Corporation. All rights reserved.

OPatchauto Version : 12.1.0.1.10
OUI Version        : 12.1.0.2.0
Running from       : /u01/app/12.1.0/grid

opatchauto log file: /u01/app/12.1.0/grid/cfgtoollogs/opatchauto/22191349/opatch_gi_2016-03-25_15-13-49_deploy.log

Parameter Validation: Successful

Configuration Validation: Successful

Patch Location: /u01/app/oracle/soft/22191349
Grid Infrastructure Patch(es): 21436941 21948341 21948344 21948354 
DB Patch(es): 21948344 21948354 

Patch Validation: Successful
Grid Infrastructure home:
/u01/app/12.1.0/grid


Performing prepatch operations on CRS Home... Successful

Applying patch(es) to "/u01/app/12.1.0/grid" ...
Patch "/u01/app/oracle/soft/22191349/21436941" successfully applied to "/u01/app/12.1.0/grid".
Patch "/u01/app/oracle/soft/22191349/21948341" successfully applied to "/u01/app/12.1.0/grid".
Patch "/u01/app/oracle/soft/22191349/21948344" successfully applied to "/u01/app/12.1.0/grid".
Patch "/u01/app/oracle/soft/22191349/21948354" successfully applied to "/u01/app/12.1.0/grid".

Performing postpatch operations on CRS Home...  Successful

Apply Summary:
Following patch(es) are successfully installed:
GI Home: /u01/app/12.1.0/grid: 21436941,21948341,21948344,21948354

opatchauto succeeded.

Now we are going to attempt to apply the PSU to the database software home. You will encounter an error message indicating that the opatch that you are invoking must be from the same $ORACLE_HOME as the target HOME that is being patched.

[root@vnarac01 ~]# opatchauto apply /u01/app/oracle/soft/22191349 -oh /u01/app/oracle/product/12.1.0/dbhome_1 -ocmrf /tmp/ocm.rsp 
opatchauto must run from one of the homes specified
opatchauto returns with error code 2
[root@vnarac01 ~]# exit
logout

Next we will apply the PSU to the database home. Again as root, first set the PATH to include the OPatch directory to the $ORACLE_HOME/OPatch directory. This time when we invoke the opatchauto command, we will pass another parameter -oh to specifically patch the database Oracle Home.

vnarac01:/u01/app/oracle/soft
+ASM1 > su - root
Password: 
[root@vnarac01 ~]# cd /u01/app/oracle/product/12.1.0/dbhome_1/OPatch
[root@vnarac01 OPatch]# export PATH=$PATH:/u01/app/oracle/product/12.1.0/dbhome_1/OPatch
[root@vnarac01 OPatch]# opatchauto apply /u01/app/oracle/soft/22191349 -oh /u01/app/oracle/product/12.1.0/dbhome_1 -ocmrf /tmp/ocm.rsp 
OPatch Automation Tool
Copyright (c)2014, Oracle Corporation. All rights reserved.

OPatchauto Version : 12.1.0.1.10
OUI Version        : 12.1.0.2.0
Running from       : /u01/app/oracle/product/12.1.0/dbhome_1

opatchauto log file: /u01/app/12.1.0/grid/cfgtoollogs/opatchauto/22191349/opatch_gi_2016-03-25_15-32-22_deploy.log

Parameter Validation: Successful

Configuration Validation: Successful

Patch Location: /u01/app/oracle/soft/22191349
Grid Infrastructure Patch(es): 21436941 21948341 21948344 21948354 
DB Patch(es): 21948344 21948354 

Patch Validation: Successful
User specified the following DB home(s) for this session:
/u01/app/oracle/product/12.1.0/dbhome_1


Performing prepatch operations on RAC Home (/u01/app/oracle/product/12.1.0/dbhome_1) ... Successful

Applying patch(es) to "/u01/app/oracle/product/12.1.0/dbhome_1" ...
Patch "/u01/app/oracle/soft/22191349/21948344" successfully applied to "/u01/app/oracle/product/12.1.0/dbhome_1".
Patch "/u01/app/oracle/soft/22191349/21948354" successfully applied to "/u01/app/oracle/product/12.1.0/dbhome_1".

Performing postpatch operations on RAC Home (/u01/app/oracle/product/12.1.0/dbhome_1) ... Successful

[WARNING] The local database(s) on "/u01/app/oracle/product/12.1.0/dbhome_1" is not running. SQL changes, if any, cannot be applied.

Apply Summary:
Following patch(es) are successfully installed:
DB Home: /u01/app/oracle/product/12.1.0/dbhome_1: 21948344,21948354


opatchauto succeeded.


Session Title: Data Guard Attack!!
Session Number: 1580
Speakers: Charles Kim, Oracle ACE Director and Nitin Vengurlekar, Oracle ACE Director
Track: Database
Session Type: Hands-on Lab
Sub-Categorization: High Availability & Data Protection

Abstract
There is no reason why Data Guard setup, configuration, maintenance and monitoring cannot be setup As A Service. Automation is the crux of any rapid deployment and cloud models. Setting up Data Guard should be a service catalog for any DBaaS deployment.

You will also learn the new Data Guard features available in Oracle Database 12.2

Download the latest and greatest Data Guard automation toolkit from http://dbaexpert.com/dg/ prior to attending this session. We have incorporated industry best practices to the DG Toolkit. This session will disseminate fundamental Data Guard best practices and demonstrate how DBAs can automate setup, configuration, and monitoring of Data Guard environments with assistance from the Date Guard Toolkit (DG Toolkit).

In this hand-on deep dive session, we will go through step by step details of setting up Data Guard with the automation toolkit:
o Building the Physical Standby
o Monitoring and Maintaining the Physical Standby
o Configuring Data Guard Broker
o Performing Backup and Recovery with RMAN
o Setting Archive Retention
o Performing Switchovers and Failovers

Learning Objectives:

1. Most importantly, learn how to build the physical standby with ease and automation using the DG Toolkit
2. Learn how to monitor the physical standby database with DG Toolkit
3. Learn how to monitor the physical standby database with DG Toolkit

Outline / Content Structure:
Perform preliminary check prior to starting the Data Guard Build
1. Perform assessments on the source database
2. Perform assessments on the physical standby

Perform detailed steps to build the physical standby database
1. Look at building the physical standby with easy menu steps
2. Look at duplicating the physical standby database

Configure the Data Guard Broker

Perform monitoring of the Data Guard Environment
1. Monitor the physical standby for performance
2. See how far behind we are

Perform RMAN to disk configuration options