0% found this document useful (0 votes)
38 views6 pages

Linux Oracle 19c CPU Apr 2023

Uploaded by

anantuprav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views6 pages

Linux Oracle 19c CPU Apr 2023

Uploaded by

anantuprav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 6

Patch 35042068 - Database Release Update 19.19.0.0.

230418(Linux Database
Server)

1) Backup databases using datapump expdp before applying the patch if


critical, else move to step 2.
a) Login to DB Server as user 'oracle'
b) Export environment variables ORACLE_HOME,ORACLE_BASE,etc ….
In this case ORACLE_HOME and ORACLE_BASE is

export ORACLE_BASE=/opt/oracle/product

export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1

export PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_SID=az19db01

c) Create physical directory backups under /u02/app/oracle if not present

cd /u02/app/oracle

mkdir backups

d) Create database level directory by connecting sys or system user.

sqlplus / as sysdba

create directory data_pump as '/u02/app/oracle/backups';

exit

e) Run expdp datapump to backup required schemas (Repeat if multiple


databases).

expdp system/manager directory=data_pump dumpfile= Dump_%U.dp


logfile= Dump.log schemas=<schema1>,<schema2>,… compression=all
parallel=3

NOTE: Replace dump file,log file,<schema1>,<schema2>,… with actual


schemas in the above expdp command.
2) Bring down all databases and listener on the server.

a) Login to DB Server as user 'oracle'


b) Stop databases using below command (Repeat if multiple databases).

export ORACLE_BASE=/opt/oracle/product

export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1

export PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_SID=az19db01

sqlplus / as sysdba

shut immediate

exit

c) Stop the listener using below command.

lsnrctl stop

3) Backup ORACLE_HOME and Orainventory into /u02/app/oracle/backups.

cd /opt/oracle/product/19c

cp -pr dbhome_1 /u02/app/oracle/backups/

cd /opt/oracle

cp -pr oraInventory /u02/app/oracle/backups/


4) Download oracle CPU Apr 2023 patches from below link and copy to
database server location /u02/app/oracle/backups.

https://artifactory.blueyonder.com/artifactory/oracle-db-cpu/com/oracle/
apr-2023/19c/

p35042068_190000_Linux-x86-64.zip

p35050341_190000_Linux-x86-64.zip

p6880880_190000_Linux-x86-64.zip

5) Extract the OPatch file using unzip utility in $ORACLE_HOME

Copy p6880880_190000_Linux-x86-64.zip to
/opt/oracle/product/19c/dbhome_1

cp p6880880_190000_Linux-x86-64 /opt/oracle/product/19c/dbhome_1/

cd /opt/oracle/product/19c/dbhome_1

mv OPatch OPatch_old

unzip p6880880_190000_Linux-x86-64.zip

6) Apply the patches on oracle home

a) Apply CPU Patch

cd /u02/app/oracle/backups

unzip p35042068_190000_Linux-x86-64.zip

unzip p35050341_190000_Linux-x86-64.zip

cd 35042068
export ORACLE_BASE=/opt/oracle/product

export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1

export PATH=$ORACLE_HOME/bin:$PATH

export PATH=$ORACLE_HOME/OPatch:$PATH

export PATH=$ORACLE_HOME/perl/bin:$PATH

export PERL5LIB=$ORACLE_HOME/perl/lib

opatch apply

Do you want to proceed? [y|n](Respond with y)

Is the local system ready for patching? [y|n] (Respond with y)

Patch 35042068 successfully applied.

OPatch succeeded.

Patch applied successfully.

b) Apply OJVM patch

cd /u02/app/oracle/backups/35050341

opatch apply

Do you want to proceed? [y|n](Respond with y)

Is the local system ready for patching? [y|n] (Respond with y)

Patch 35050341 successfully applied.

OPatch succeeded.

Patch applied successfully.


7) Load Modified SQL Files into the Database

For each separate database running on the same shared Oracle home being
patched, run the datapatch utility as described below.

export ORACLE_BASE=/opt/oracle/product

export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1

export PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_SID=az19db01

sqlplus / as sysdba

startup

exit

cd $ORACLE_HOME/OPatch

datapatch -verbose

Start the Listener

lsnrctl start

You might also like