How to apply PSU Patch on Grid Infra and Database

Applying PSU Patch on Grid Infrastructure and Database

PSU stands for PATCH SET UPDATE.

 

Version Details

Grid Version: 12.1.0.2
DB Version : 11.2.0.4
OS: Linux
RAC : Two nodes

 

Patch Details:

Download PSU Patch: Jul 2018 on Linux x86-64 OS
Patch 27967747: Oracle Database – Enterprise Edition 12.1.0.2.0 for Linux x86-64 – GI PSU
Patch 27734982: Oracle Database – Enterprise Edition 11.2.0.4.0 for Linux x86-64 – DB PSU

Conflict checks on both nodes

export ORACLE_HOME=/u00/grid/oracle/product/12102/grid
export PATH=$ORACLE_HOME/OPatch:$PATH
which opatch
opatch version

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762253
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762277
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/26983807
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27547329

opatch prereq CheckSystemSpace -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762253
opatch prereq CheckSystemSpace -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762277
opatch prereq CheckSystemSpace -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/26983807
opatch prereq CheckSystemSpace -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27547329

export ORACLE_HOME=/u00/app/oracle/product/11204/db_1
export PATH=$ORACLE_HOME/OPatch:$PATH
which opatch
opatch version

cd /u00/app/oracle/dbpsu_patch_Jul2018/27734982

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

opatch prereq CheckSystemSpace -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27734982

cd /u00/app/oracle/dbpsu_patch_Jul2018/27923163

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

opatch prereq CheckSystemSpace -phBaseDir /u00/app/oracle/dbpsu_patch_Jul2018/27923163

 

GI , DB and ojvm patch action plan on node1

hostname: node1

username : oracle
ps -ef | grep pmon

ps -ef | grep lsnr

. oraenv

+ASM

crsctl stat res -t

crsctl stat res-init -t

Shutdown all Databases on node1

. oraenv

ORCLP1

sqlplus / as sysdba

shutdown immediate

exit

Continue the above steps for all instances– shutdown all dbs  on this node1

PSU  patch action plan

hostname: node1

username : oracle
ps -ef | grep pmon

ps -ef | grep lsnr

. oraenv

+ASM

crsctl stat res -t

crsctl stat res-init -t

Shutdown  Databases on node1

. oraenv

ORCLP1

sqlplus / as sysdba

shutdown immediate

exit

Continue the above steps for all instances– stop all instaces on this node1

Connect to root user

sudo su – root

/u00/grid/oracle/product/12102/grid/crs/install/roothas.pl -prepatch – if this command is not work, then replace roothas.pl to roothas.sh

ps -ef |grep -i d.bin

ps -ef | grep -i oracle

Make sure that no oracle process are running with respect to grid and db home binaries.

Now apply the patch to grid home as mentioned below run each command alone.

Run below commands from oracle user:

 

su – oracle

export ORACLE_HOME=/u00/grid/oracle/product/12102/grid

export PATH=$ORACLE_HOME/OPatch:$PATH

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762253

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762277

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/26983807

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27547329

After above four commands completed , verify the above patches are listing or not by running below commands:

opatch lspatches

Now apply the patch to db home as mentioned below run each command alone from oracle user.

export ORACLE_HOME=/u00/app/oracle/product/11204/db_1

export PATH=$ORACLE_HOME/OPatch:$PATH

cd /u00/app/oracle/dbpsu_patch_Jul2018/27734982

opatch apply

verify the above patche is listing or not by running below command

opatch lspatches

Run the below two post scripts. As the root user execute(Important) : sudo su – root

/u00/grid/oracle/product/12102/grid/rdbms/install/rootadd_rdbms.sh

/u00/grid/oracle/product/12102/grid/crs/install/roothas.pl -postpatch
==>wait for the above command to complete, it wll bring up all services.
==>if this command is not work, then replace roothas.pl to roothas.sh

 

POST Steps for PSU Patch

 

Execute steps as mentioned below server only:

hostname: node1

. oraenv

ORCLP1

cd $ORACLE_HOME/rdbms/admin

sqlplus / as sysdba

if db is not up, bring it up

startup

@catbundle.sql psu apply

exit

Continue above steps on all remaining databases on node1

Continue with OJVM Patch

export ORACLE_HOME=/u00/app/oracle/product/11204/db_1

export PATH=$ORACLE_HOME/OPatch:$PATH

cd /u00/app/oracle/dbpsu_patch_Jul2018/27923163

. oraenv

ORCLP1

sqlplus / as sysdba

shutdown immediate

exit

==> Note : shut down all Databases on node1

opatch apply -local

opatch lsinventory | grep 27923163

 Continue with post steps as mentioned below for ojvm

. oraenv

ORCLP1

cd $ORACLE_HOME/sqlpatch/27923163

sqlplus /nolog

CONNECT / AS SYSDBA

STARTUP UPGRADE

show parameter db_name

@postinstall.sql

verify the Invalids, if any new invalids listing, please compile them by using utlrp.sql

SHUTDOWN

exit

sqlplus / as sysdba

startup

exit

==> Note continue above steps for all databases on node1.

Continue above steps on node2 also under GI , DB and OJVM plan

Connect to root user
——————-

sudo su – root

/u00/grid/oracle/product/12102/grid/crs/install/roothas.pl -prepatch – if this command is not work, then replace roothas.pl to roothas.sh

ps -ef |grep -i d.bin

ps -ef | grep -i oracle

Make sure that no oracle process are running with respect to grid and db home binaries.

Now apply the patch to grid home as mentioned below run each command alone.

Run below commands from oracle user:

su – oracle

export ORACLE_HOME=/u00/grid/oracle/product/12102/grid

export PATH=$ORACLE_HOME/OPatch:$PATH

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762253

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27762277

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/26983807

opatch apply -oh /u00/grid/oracle/product/12102/grid -local /u00/app/oracle/dbpsu_patch_Jul2018/27967747/27547329

After above four commands completed , verify the above patches are listing or not by running below commands:

opatch lspatches

Now apply the patch to db home as mentioned below run each command alone from oracle user.

export ORACLE_HOME=/u00/app/oracle/product/11204/db_1

export PATH=$ORACLE_HOME/OPatch:$PATH

cd /u00/app/oracle/dbpsu_patch_Jul2018/27734982

opatch apply

verify the above patche is listing or not by running below command

opatch lspatches

Run the below two post scripts. As the root user execute(Important) : sudo su – root

/u00/grid/oracle/product/12102/grid/rdbms/install/rootadd_rdbms.sh

/u00/grid/oracle/product/12102/grid/crs/install/roothas.pl -postpatch
==>wait for the above command to complete, it wll bring up all services.
==>if this command is not work, then replace roothas.pl to roothas.sh

POST Steps for PSU Patch

Execute steps as mentioned below server only:

hostname: node1

. oraenv

ORCLP1

cd $ORACLE_HOME/rdbms/admin

sqlplus / as sysdba

if db is not up, bring it up

startup

@catbundle.sql psu apply

exit

Continue above steps on all remaining databases on node1

Continue with OJVM Patch

export ORACLE_HOME=/u00/app/oracle/product/11204/db_1

export PATH=$ORACLE_HOME/OPatch:$PATH

cd /u00/app/oracle/dbpsu_patch_Jul2018/27923163

. oraenv

ORCLP1

sqlplus / as sysdba

shutdown immediate

exit

==> Note : shut down all Databases on node1

opatch apply -local

opatch lsinventory | grep 27923163

 Continue with post steps as mentioned below for ojvm
. oraenv

ORCLP1

cd $ORACLE_HOME/sqlpatch/27923163

sqlplus /nolog

CONNECT / AS SYSDBA

STARTUP UPGRADE

show parameter db_name

@postinstall.sql

verify the Invalids, if any new invalids listing, please compile them by using utlrp.sql

SHUTDOWN

exit

sqlplus / as sysdba

startup

exit

==> Note continue above steps for all databases on node2.

Continue above steps on node2 also under GI , DB and OJVM plan

 

See also