By Mouhamadou Diaw

RU, MRP should be applied to database home as soon as possible. Usually we often nstall the base version and after install the RU on top on the base version

For example we want to have the version21.8

We usually

-Install  the LINUX.X64_213000_db_home.zip-

– And then apply the RU 21.8  34527084

But another method is to apply the RU during the installation of the Oracle software. Indeed, the runInstaller command has an option -applyRU that allows to do so

[oracle@oraadserver 21.3.0]$ /u01/app/oracle/product/21.3.0/dbhome_8/runInstaller -help | grep applyRU
        -applyRU - apply release update to the Oracle home.
[oracle@oraadserver 21.3.0]$

In this blog I am showing how we can use this option to directly install an Oracle 21.8

First download following files

LINUX.X64_213000_db_home.zip : base version

p34527084_210000_Linux-x86-64.zip : RU 21.8

As you may already know RU requests a minimum version of OPatch. You can have this information in the Readme of the RU

Then also download the latest OPatch

Below my files

oracle@oraadserver:/home/oracle/ [rdbms21c] ls -ltra *.zip
-rw-r--r--. 1 oracle oinstall 3109225519 Feb 10 18:39 LINUX.X64_213000_db_home.zip
-rw-r--r--. 1 oracle oinstall 1155081421 Feb 17 15:49 p34527084_210000_Linux-x86-64.zip
-rw-r--r--. 1 oracle oinstall  124347218 Feb 17 16:04 p6880880_210000_Linux-x86-64.zip
oracle@oraadserver:/home/oracle/ [rdbms21c]

The first step is to unpack the base version in your new Oracle Home

oracle@oraadserver:/home/oracle/ [rdbms21c] unzip -q -d /u01/app/oracle/product/21.3.0/dbhome_8 LINUX.X64_213000_db_home.zip

As specified earlier, you have to update your OPatch version. Just unpack the OPatch zip file in your new Oracle_home

oracle@oraadserver:/u01/app/oracle/product/21.3.0/dbhome_8/ [rdbms21c] pwd
/u01/app/oracle/product/21.3.0/dbhome_8
oracle@oraadserver:/u01/app/oracle/product/21.3.0/dbhome_8/ [rdbms21c] mv OPatch/ OPatch.old
oracle@oraadserver:/u01/app/oracle/product/21.3.0/dbhome_8/ [rdbms21c] unzip -q -d . /home/oracle/p6880880_210000_Linux-x86-64.zip

Validate the version of your OPatch

oracle@oraadserver:/home/oracle/ [rdbms21c] /u01/app/oracle/product/21.3.0/dbhome_8/OPatch/opatch version
OPatch Version: 12.2.0.1.36

OPatch succeeded.
oracle@oraadserver:/home/oracle/ [rdbms21c]

Unpack the RU zip file

oracle@oraadserver:/home/oracle/ [rdbms21c] unzip -q -d 218RU/ p34527084_210000_Linux-x86-64.zip

Then run following runInstaller command with the applyRU option

[oracle@oraadserver 21.3.0]$ /u01/app/oracle/product/21.3.0/dbhome_8/runInstaller -silent -applyRU /home/oracle/218RU/34527084/ -responseFile /home/oracle/db_21c.rsp
Preparing the home to patch...
Applying the patch /home/oracle/218RU/34527084/...
Successfully applied the patch.
The log can be found at: /u01/app/oraInventory/logs/InstallActions2023-02-18_08-45-01AM/installerPatchActions_2023-02-18_08-45-01AM.log
Launching Oracle Database Setup Wizard...

[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2023-02-18_08-45-01AM/installActions2023-02-18_08-45-01AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2023-02-18_08-45-01AM/installActions2023-02-18_08-45-01AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/app/oracle/product/21.3.0/dbhome_8/install/response/db_2023-02-18_08-45-01AM.rsp

You can find the log of this install session at:
 /u01/app/oraInventory/logs/InstallActions2023-02-18_08-45-01AM/installActions2023-02-18_08-45-01AM.log

As a root user, execute the following script(s):
        1. /u01/app/oracle/product/21.3.0/dbhome_8/root.sh

Execute /u01/app/oracle/product/21.3.0/dbhome_8/root.sh on the following nodes:
[oraadserver]


Successfully Setup Software with warning(s).
[oracle@oraadserver 21.3.0]$

As requested run the root.sh command

[root@oraadserver ~]# /u01/app/oracle/product/21.3.0/dbhome_8/root.sh
Check /u01/app/oracle/product/21.3.0/dbhome_8/install/root_oraadserver_2023-02-18_08-48-23-730223661.log for the output of root script
[root@oraadserver ~]#

The opatch command returns the level of RU on the new Oracle_Home 21.8

[oracle@oraadserver 21.3.0]$ /u01/app/oracle/product/21.3.0/dbhome_8/OPatch/opatch lspatches
34527084;Database Release Update : 21.8.0.0.221018 (34527084)

OPatch succeeded.
[oracle@oraadserver 21.3.0]$

Let’s create a database and let’s validate that the RU 21.8 has been applied.

[oracle@oraadserver ~]$ /u01/app/oracle/product/21.3.0/dbhome_8/bin/dbca -silent -createDatabase -responseFile /home/oracle/dbca_21c.rsp

Let’s create a database and let’s validate that the RU 21.8 has been applied.

SQL> select PATCH_ID,DESCRIPTION,STATUS from dba_registry_sqlpatch;

  PATCH_ID DESCRIPTION                                          STATUS
---------- ---------------------------------------------------- --------
  34527084 Database Release Update : 21.8.0.0.221018 (34527084) SUCCESS

SQL>

Conclusion

Hope this blog helps. Note that you also can use the graphical tool instead of a response file.