Patching Oracle 18c database in Windows

Download the database patch from Oracle support

Also, download the latest OPatch utility for Windows OS as shown below:

Picture1

Check your environment variables:

set PATH=%ORACLE_HOME%\perl\bin;%PATH%

set ORACLE_HOME=D:\Oracle18c_Windows\WINDOWS.X64_180000_db_home

set PERL5LIB=

Shutdown Oracle database services:

Picture2

Stop Distributed Transaction Coordinator

net stop msdtc

Go to the directory where the patch is downloaded

cd D:\ORACLE_WINDOWS_PATCHING\29589622

D:\OPATCH_DOWNLOAD\OPatch\opatch apply

When you try to apply the patch the following  error will occur if the OPatch utility is NOT placed within the Oracle database home binary

Picture3

Error in Text: The Oracle Home D:\OPATCH is not OUI based home. Please give proper Oracle Home

after placing the OPatch utility under Oracle Home, apply the patch:

D:\Oracle18c_Windows\WINDOWS.X64_180000_db_home\OPatch\opatch apply

Picture4

To resolve this error I will rollback this patch first:

D:\Oracle18c_Windows\WINDOWS.X64_180000_db_home\OPatch\opatch rollback -id 28267731

Picture5

And attempting to re-apply the patch will succeed

Picture6

Startup the Oracle services again:

Picture7

Post-Patch activity:

sqlplus / as sysdba

SQL> startup

SQL> alter pluggable database all open;

exit;

cd D:\Oracle18c_Windows\WINDOWS.X64_180000_db_home\OPatch

datapatch -verbose

sqlplus / as sysdba

SQL> @?/rdbms/admin/utlrp.sql

SQL> select * from dba_registry_sqlpatch;

Picture8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Oracle 18c installation in Linux

in this blog post i will describe the necessary steps to install Oracle 18c in Linux Red Hat.

First, pre-requisite steps:

check that all packages required are installed, check the following link as reference:

https://docs.oracle.com/en/database/oracle/oracle-database/18/cwlin/supported-red-hat-enterprise-linux-7-distributions-for-x86-64.html#GUID-2E11B561-6587-4789-A583-2E33D705E498

Kernel values: https://docs.oracle.com/en/database/oracle/oracle-database/18/cwlin/changing-kernel-parameter-values.html#GUID-FB0CC366-61C9-4AA2-9BE7-233EB6810A31

Another way to check pre-requisites is ORACHK tool , this tool can be downloaded from Oracle Support Doc ID 1268927.2.

copy the zip folder downloaded for ORACHK to database file system:

unzip orachk.zip

To check Installation Readiness, execute the following:

./orachk -profile preinstall

To check Upgrade Readiness, execute the following:

./orachk -u -o pre

Second, Installation using GUI:

reconfigure your profile to point to Oracle 18c binaries (new home).

use the following command to unzip the binaries:

unzip -q /oracle/app/LINUX.X64_180000_db_home.zip -d /oracle/ora15/product/18.3

 

cd /oracle/ora15/product/18.3

./runInstaller

11

22

33

44

55

66

77

88

Third, Silent Installation Option:

please note that you need to edit(modify) the file db_reponse_tmp.rsp located under $ORACLE_HOME/install/response

*** checking prerequisites before installation :

$ORACLE_HOME/runInstaller -silent -executePrereqs -responseFile $ORACLE_HOME/install/response/db_reponse_tmp.rsp

*** Silent Installation :

$ORACLE_HOME/runInstaller -silent -responseFile $ORACLE_HOME/install/response/db_reponse_tmp.rsp

 

you will need to run root.sh