Step by Step How To Applying Patch 27010930 - Database Proactive Bundle Patch 12.1.0.2.180116 (16JAN2018)
Step by Step How To Applying Patch 27010930 - Database Proactive Bundle Patch 12.1.0.2.180116 (16JAN2018)
Prerequisites
**************
su -
mkdir -p /u01/patch/12.1.0.2.180116
chmod -R 777 /u01/patch/12.1.0.2.180116
su - grid
cd /u01/patch/12.1.0.2.180116
ls -lrt
Steps
******
---Node1--GridHome---
su - grid
/u01/app/12.1.0/grid/OPatch/opatch version
---start:output---
OPatch Version: 12.1.0.1.3
OPatch succeeded.
---end:output---
unzip /u01/patch/12.1.0.2.180116/p6880880_121010_Linux-x86-64.zip -d
/u01/app/12.1.0/grid
---start:output---
Archive: /u01/patch/12.1.0.2.180116/p6880880_121010_Linux-x86-64.zip
inflating: /u01/app/12.1.0/grid/OPatch/operr
replace /u01/app/12.1.0/grid/OPatch/datapatch? [y]es, [n]o, [A]ll, [N]one, [r]ename:
A
inflating: /u01/app/12.1.0/grid/OPatch/datapatch
inflating: /u01/app/12.1.0/grid/OPatch/emdpatch.pl
...
...
1
---end:output---
/u01/app/12.1.0/grid/OPatch/opatch version
---start:output---
OPatch Version: 12.2.0.1.14
OPatch succeeded.
---end:output---
---Node1--DatabaseHome---
su - oracle
/u01/app/oracle/product/12.1.0/dbhome_1/OPatch/opatch version
---start:output---
OPatch Version: 12.1.0.1.3
OPatch succeeded.
---end:output---
unzip /u01/patch/12.1.0.2.180116/p6880880_121010_Linux-x86-64.zip -d
/u01/app/oracle/product/12.1.0/dbhome_1
---start:output---
Archive: /u01/patch/12.1.0.2.180116/p6880880_121010_Linux-x86-64.zip
inflating: /u01/app/oracle/product/12.1.0/dbhome_1/OPatch/operr
replace /u01/app/oracle/product/12.1.0/dbhome_1/OPatch/datapatch? [y]es, [n]o,
[A]ll, [N]one, [r]ename: A
inflating: /u01/app/oracle/product/12.1.0/dbhome_1/OPatch/datapatch
inflating: /u01/app/oracle/product/12.1.0/dbhome_1/OPatch/emdpatch.pl
...
...
---end:output---
/u01/app/oracle/product/12.1.0/dbhome_1/OPatch/opatch version
---start:output---
OPatch Version: 12.2.0.1.14
OPatch succeeded.
---end:output---
--Node2
---Node2--GridHome---
su - grid
/u01/app/12.1.0/grid/OPatch/opatch version
unzip /u01/patch/12.1.0.2.180116/p6880880_121010_Linux-x86-64.zip -d
/u01/app/12.1.0/grid
/u01/app/12.1.0/grid/OPatch/opatch version
---start:output---
same as in Node 1
---end:output---
---Node2--DatabaseHome---
su - oracle
/u01/app/oracle/product/12.1.0/dbhome_1/OPatch/opatch version
2
unzip /u01/patch/12.1.0.2.180116/p6880880_121010_Linux-x86-64.zip -d
/u01/app/oracle/product/12.1.0/dbhome_1
/u01/app/oracle/product/12.1.0/dbhome_1/OPatch/opatch version
---start:output---
same as in Node 1
---end:output---
--Node1
--Node2
@ 1.2.1.2 Validation of Oracle Inventor
--Node1
su - grid
export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
export ORACLE_HOME=/u01/app/12.1.0/grid
opatch lsinventory -detail -oh /u01/app/12.1.0/grid
---start:output---
output01.txt
---end:output---
su - oracle
export PATH=$PATH:/u01/app/oracle/product/12.1.0/dbhome_1/OPatch
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/dbhome_1
---start:output---
output02.txt
---end:output---
--Node2
su - grid
export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
export ORACLE_HOME=/u01/app/12.1.0/grid
opatch lsinventory -detail -oh /u01/app/12.1.0/grid
---start:output---
same as in Node 1
---end:output---
su - oracle
export PATH=$PATH:/u01/app/oracle/product/12.1.0/dbhome_1/OPatch
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
opatch lsinventory -detail -oh /u01/app/oracle/product/12.1.0/dbhome_1
---start:output---
same as in Node 1
---end:output---
3
--Node1
@ 1.2.1.3 Download and Unzip the Patch
To apply the patch, it must be accessible from all nodes in the Oracle cluster.
Download the patch and unzip it as grid home owner to a shared location. This
directory must be empty and not be /tmp. Additionally, the directory should have
read permission for the ORA_INSTALL group.
In this installation, the patch is staged in both nodes, rather than a shared location.
su - grid
cd /u01/patch/12.1.0.2.180116
unzip p27010930_121020_Linux-x86-64.zip
ls -lrt
---start:output---
[grid@dc1-+ASM1 12.1.0.2.180116]$ ls -lrt
total 2546760
drwxr-xr-x 7 grid oinstall 4096 Jan 8 2018 27010930
-rw-rw-r-- 1 grid oinstall 433939 Jan 16 2018 PatchSearch.xml
-rwxrwx--- 1 oracle oinstall 99183505 Jul 21 13:11
p6880880_121010_Linux-x86-64.zip
-rwxrwx--- 1 oracle oinstall 2508252204 Jul 22 15:51
p27010930_121020_Linux-x86-64.zip
[grid@dc1-+ASM1 12.1.0.2.180116]$
---end:output---
--Node2
@ 1.2.1.3 Download and Unzip the Patch
To apply the patch, it must be accessible from all nodes in the Oracle cluster.
Download the patch and unzip it as grid home owner to a shared location. This
directory must be empty and not be /tmp. Additionally, the directory should have
read permission for the ORA_INSTALL group.
In this installation, the patch is staged in both nodes, rather than a shared location.
su - grid
cd /u01/patch/12.1.0.2.180116
unzip p27010930_121020_Linux-x86-64.zip
ls -lrt
---start:output---
[grid@dc2-+ASM2 12.1.0.2.180116]$ ls -lrt
total 2546760
drwxr-xr-x 7 grid oinstall 4096 Jan 8 2018 27010930
-rw-rw-r-- 1 grid oinstall 433939 Jan 16 2018 PatchSearch.xml
-rwxrwx--- 1 oracle oinstall 99183505 Jul 21 13:11
p6880880_121010_Linux-x86-64.zip
-rwxrwx--- 1 oracle oinstall 2508252204 Jul 22 15:51
p27010930_121020_Linux-x86-64.zip
[grid@dc2-+ASM2 12.1.0.2.180116]$
---end:output---
--Node1
--Node2
@ 1.2.1.4 Run OPatch Conflict Check
4
Determine whether any currently installed one-off patches conflict with the
Database Proactive Bundle Patch 12.1.0.2.180116 27010930 as follows:
--Node1
--Node2
@ 1.2.1.5 Run OPatch SystemSpace Check
* Check if enough free space is available on the ORACLE_HOME filesystem for the
patches to be applied as given below:
--Node1
--Node2
* For Grid Infrastructure Home, as home user:
su - grid
nano /tmp/patch_list_gihome.txt
file content:
/u01/patch/12.1.0.2.180116/27010930/26983807
/u01/patch/12.1.0.2.180116/27010930/26910974
/u01/patch/12.1.0.2.180116/27010930/26925218
/u01/patch/12.1.0.2.180116/27010930/26925263
* Run the opatch command to check if enough free space is available in the Grid
Infrastructure Home:
su - grid
export ORACLE_HOME=/u01/app/12.1.0/grid
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile
/tmp/patch_list_gihome.txt
---start:output---
output03.txt
(same for both nodes)
---end:output---
5
--Node1
--Node2
* For Database home, as home user:
su - oracle
nano /tmp/patch_list_dbhome.txt
file content:
/u01/patch/12.1.0.2.180116/27010930/26925218
/u01/patch/12.1.0.2.180116/27010930/26925263
* Run opatch command to check if enough free space is available in the Database
Home:
su - oracle
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile
/tmp/patch_list_dbhome.txt
---start:output---
output04.txt
(same for both nodes)
---end:output---
--Node1
--Node2
* The command output reports pass and fail messages as per the system space
availability:
The fastest and easiest way to determine whether you have one-off patches in the
Oracle home that conflict with the patch, and to get the necessary conflict
resolution patches, is to use the Patch Recommendations and Patch Plans features
on the Patches & Updates tab in My Oracle Support. These features work in
conjunction with the My Oracle Support Configuration Manager. Recorded training
sessions on these features can be found in Document 603505.1.
--Node1
--Node2
@ 1.2.3 opatchauto
The Opatch utility has automated the patch application for the Oracle Grid
Infrastructure (GI) home and the Oracle RAC database homes. It operates by
querying existing configurations and automating the steps required for patching
each Oracle RAC database home of same version and the GI home.
The utility must be executed by an operating system (OS) user with root privileges,
and it must be executed on each node in the cluster if the GI home or Oracle RAC
6
database home is in non-shared storage. The utility should not be run in parallel on
the cluster nodes.
Add the directory containing the opatchauto to the $PATH environment variable.
For example:
# export PATH=$PATH:<GI_HOME>/OPatch
To patch the GI home and all Oracle RAC database homes of the same version:
# opatchauto apply <UNZIPPED_PATCH_LOCATION>/27010930
su - root
export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
opatchauto apply /u01/patch/12.1.0.2.180116/27010930
---start:output---
output05.txt
---end:output---
su - root
export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
opatchauto apply /u01/patch/12.1.0.2.180116/27010930
---start:output---
output06.txt
---end:output---
* To roll back the patch from the GI home and each Oracle RAC database home:
su -
export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
opatchauto rollback /u01/patch/12.1.0.2.180116/27010930
* Case 1: Oracle RAC, where the GI Home and the Database Homes are not shared
and ACFS file system is not configured.
As root user, execute the following command on each node of the cluster:
7
* Case 2: Oracle RAC, where the GI Home is not shared, Database Home is shared,
ACFS may be used.
(see the README.html)
- If you are not using opatchauto, then load modified SQL files into the database,
as explained in Loading Modified SQL Files into the Database.
- The MD5 hash is no longer considered sufficiently secure, see MD5 Hash Is No
Longer Considered Sufficiently Secure.
From "Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1)"
--- start quote ---
OPatchAuto calls datapatch to complete post patch actions upon installation of the
binary patch and restart of the database. As noted earlier, datapatch identifies the
post install instructions which are necessary and automatically completes the same.
Post patch activity include both the application and the removal or rollback of SQL
changes in the database.
--- end quote ---
[During the first patching run, opatchauto is being used and t runs Datapatch.
However, as per the README document, Run Datapatch as shown below]
The following steps load modified SQL files into the database. For a RAC
environment, perform these steps on only one node.
Datapatch is run to complete the post-install SQL deployment for the PSU. For
further details about Datapatch, including Known Issues and workarounds to
common problems, see: Database 12c Post Patch SQL Automation (Doc ID
1585822.1).
* For each separate database running on the same shared Oracle home being
patched, run the datapatch utility as described in Table 4 for Standalone DB (for
more details, see the README.html):
8
su - oracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=primdb1
sqlplus /nolog
Connect / as sysdba
startup
quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose
---start:output---
output07.txt
---end:output---
* If the OJVM PSU is also installed, you may see invalid objects after execution of
datapatch in the previous step. If this is the case, run utlrp.sql to revalidate these
objects.
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
*** Skip these steps, Oracle Recovery Manager Catalog is not being used. ***
It has been determined that MD5 hash is no longer considered sufficiently secure.
After this patch is applied, user creation is changed so that the MD5 hash is no
longer generated by default. This only applies to users created after this patch is
applied; existing users will not be changed. Review the following note to determine
if you need to take further actions.
You must execute the steps in Loading Modified SQL Files into the Database for any
new or upgraded database.
9
* Case 1: Oracle RAC, where the GI Home and Database Homes are not shared and
ACFS file system is not configured.
As root user, execute the following command on each node of the cluster.
# <GI_HOME>/OPatch/opatchauto rollback
<UNZIPPED_PATCH_LOCATION>/27010930
If the message, "A system reboot is recommended before using ACFS" is shown,
then a reboot must be issued before continuing. Failure to do so will result in
running with an unpatched ACFS\ADVM\OKS driver.
* Case 2: Oracle RAC, where the GI Home is not shared, Database Home is shared
and ACFS may be used
(see the README.html)
--Node1
--Node2
---GridHome---
su - grid
export PATH=$PATH:/u01/app/12.1.0/grid/OPatch
export ORACLE_HOME=/u01/app/12.1.0/grid
opatch lsinventory -oh /u01/app/12.1.0/grid
---start:output---
output09.txt
(same on both nodes)
---end:output---
---DatabaseHome---
su - oracle
export PATH=$PATH:/u01/app/oracle/product/12.1.0/dbhome_1/OPatch
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
opatch lsinventory -oh /u01/app/oracle/product/12.1.0/dbhome_1
---start:output---
output10.txt
(same on both nodes)
---end:output---
10