Apply Latest Release Update (January-2021) Patch on Oracle Database 19c Step by Step Tutorial
In this article we have a discussion about how to apply latest Release Update (RU) patch on oracle database 19c. Here, we are going to show the latest (January-2021) Release update (RU) patch apply steps.
Patch installation steps divide into four section
1. Pre-installation
2. Installation
3. Post Installation
4. Deinstallation
1. Pre-installation
Before apply patch highly recommended to take backup oracle home.
Take oracle home backup as following
# cd /u01/oracle/product/19.0.0 (oracle home location)
# tar -pcvf /backup/oracle_home_bkup_210120.tar db_1 (db_1 is the home directory)
Before apply RU patch check carefully opatch utility version 12.2.0.1.23 or later to apply the patch. If opatch version is lower than recommended version, then upgrade the opatch utility. Latest opatch utility version is available in oracle support we download the latest opatch utility selecting the 12.2.0.1.0 release and upgrade the opatch utility.
Check opatch version using following command
# cd $ORACLE_HOME/Opatch
# ./opatch version
Opatch utility version upgradation steps are as follow
a. Take backup opatch directory using following steps
Go to the oracle home and take backup
# cd $ORACLE_HOME
# tar -pcvf Opatch_bkp.tar Opatch (backup the current opatch directory)
b. Download latest opatch utility from oracle support
c. Downloaded latest opatch utility upload into the server in any directory of server
unzip the latest opatch utility into the Oracle Home directory
# unzip p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME
d. After completing unzip check again opatch version using following command
# ./opatch version
Output: OPatch Version: 12.2.0.1.23
Now check the last apply patch list using follow command
./opatch lsinventory
Check oracle database version using below query
Sql> select banner from v$version;
2. Patch Installation
Below release update patch apply steps for single instance database environment
Step 1: download the latest Release Update patch set from http://support.oracle.com/ and unzip patch in same server which database server we want to apply patch
Step 2: Shutdown database and listener
Sqlplus / as sysdba
sql> shutdown immediate
Stop Listener:
# lsnrctl stop -- stop listener
check listener as follow
# lsnrctl status
Step 3: Apply opatch
Upload the patch file into server any directory and unzip the patch file
Give the proper permission of patch unzip directory and set the oracle home
we upload the patch file into /backup/patch directory and unzip the patch using following command
# unzip p32218454_190000_Linux-x86-64.zip it will create a new directory and unzipped patch location is
# /backup/patch/32218454 (patch unzip location)
Patch location ownership and permission provided using below command
# chown -R oracle:oinstall /backup/patch/32218454
# chmod -R 775 /backup/patch/32218454
Now go to opatch location and apply patch
# cd $ORACLE_HOME/Opatch
# ./opatch apply /backup/patch/32218454
In patch apply stage will ask for two input value and we will insert y as input. If all goes okay patch apply will be completed with OPatch succeeded message.
Output:
Do you want to proceed? [y|n] y
User Responded with: Y
Is the local system ready for patching? [y|n] Y
Check apply patch using following command
Now we run the following command to check whether patch is applied or not.
# cd $ORACLE_HOME/Opatch
# ./opatch lsinventory
## Using below query we can check last applied patch number and patch apply date
SQL> select PATCH_ID,to_char(ACTION_TIME,'DD-MON-YY'), action from sys.dba_registry_sqlpatch;
3. Patch Post-Installation Step
After successfully apply release update patch we start the oracle database and listener using following command.
Startup the database and listener using below command
Sqlplus / as sysdba
Sql> startup
Startup listener
lsnrctl start
Now run the datapatch which is the patching tool to complete the post-patch SQL actions for RDBMS patches
Go to the location $ORACLE_HOME/OPatch
./datapatch -verbose
Finally, compile the invalid object running the script utlrp.sql
cd $ORACLE_HOME/rdbms/admin
sql> sqlplus / as sysdba
@utlrp.sql
Latest release update patch apply is completed!
Now we will see the patch deinstallation steps as follow
4. Patch Deinstall Steps
Below portion we will focus on how to deinstall applied patch.
Patch deinstall steps for single database environment is given below
Shutdown the database and listener
Sqlplus / as sysdba
Sql> shutdown immediate
Lsnrctl stop
Go to the opatch directory (cd $ORACLE_HOME/OPatch)
Opatch.bat rollback -id 32218454 (patch number)
5. Patch Post Deinstallation steps
Patch Post-Deinstallation Instructions for a Single Instance Database Environment
Startup the database and listener
Sqlplus / as sysdba
Sql> startup
Lsnrctl start
Go to the opatch directory (cd $ORACLE_HOME/OPatch)
datapatch -verbose
Post a Comment
0 Comments