Saturday, 23 November 2024

How to Apply OCT-2024 RU patches on Oracle 19C Non-RAC Database

 Dear All,


In this post i am going to share How to Apply OCT-2024 RU patches on Oracle 19C Non-RAC Database step by step process.


Oracle Database 19c Proactive Patch Information (Doc ID 2521164.1)

>> downloaded latest OCT 2024 RU patch  (36912597)

>> downloaded latest Opatch utility .( 6880688)

 High level steps

Ø  Check the existing patches.

Ø  Download the patches from support.oracle.com

Ø  Copy to the database server and unzip.

Ø  Upgrade opatch utility to as per  recommended level ( readme file )

Ø  Unzip the main RU patch and do the patch analysis.

$cd 36912597 
$/u01/app/oracle/product/19.0.0/db_home/OPatch/opatch
prereq CheckConflictAgainstOHWithDetail -ph ./ 
> Take downtime to apply the RU
patches. ( DEV >> TEST >> UAT >> PROD ) 
>Demo
instance approvals not required .. 
>>>  Take database full backup and other
important configuration files backups.

 Ex :: Rman / cold / hot 

Ø  Take Invalid count ( complete invalid objects ).

Ø  Ø   Stop the db listener and database.9PM IST 10PM IST )

Ø  Ø  Apply the patch using opatch command.

Ø  Ø  Start the database and db listener. 

Ø  ØTake invalid count and compare before patch and after patch, if any issues compile invalids. 

ؠؠ Still more invalids contact oracle support.

No invalids .. 

Ø  Run the datapatch verbose (* its should run post RU / CPU / major patches )  

Ø  Release the instance for business.  

   





 


>>> Click on the patch and download .. select the OS as per your environment , here im using Linux X86-64 bit ..for 19C database.



Click on download then 



Click on Zip file .. 1.7G



Once its downloaded upload to database server and proceed further steps as per the readme file .

Oracle® Database Patch 36912597 - Database Release Update 19.25.0.0.241015

Download latest Opatch utility 



Patch 6880880


After copy the both patches to database server .. fist upgrade the opatch utility version then start apply the OCT-2024 CPU

 

unzip p36912597_<version>_<platform>.zip

cd 36912597

opatch prereq CheckConflictAgainstOHWithDetail -ph ./

 

unzip -d <PATCH_TOP_DIR> p36912597_<version>_<platform>.zip
cd <PATCH_TOP_DIR> 36912597
opatch apply

 

Multitenant (CDB/PDB) Oracle Database

Sqlplus / as sysdba

Startup

alter pluggable database all open;

cd $ORACLE_HOME/OPatch

./datapatch -sanity_checks

./datapatch -verbose

 

 

Note :

  1. Any (pluggable) database that has invalid objects after the execution of datapatch should have catcon.pl run to revalidate those objects. For example:

2. export PATH=$PATH:$ORACLE_HOME/bin

3. cd $ORACLE_HOME/rdbms/admin

$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -n 1 -e -b utlrp -d

Document 2521164.1

High level steps

Ø  Check the existing patches.



Ø  Download the patches from support.oracle.com









Ø  Copy the patch zip file to the database server and unzip.



Ø  Upgrade opatch utility to as per  recommended level ( readme file )




Ø  Unzip the main RU patch and do the patch analysis.




$cd 36912597

/u01/app/oracle/product/19.0.0/db_home/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./



Ø  Take downtime to apply the RU patches. ( DEV >> TEST >> UAT >> PROD )

Demo instance approvals not required ..

Ø  Take database full backup and other important configuration files backups.

ex: types of backups in oracle database .. Rman / cold/ hot

Ø  Take Invalid count ( complete invalid objects ).


Ø  Stop the db listener and database.(9PM IST to 10PM IST )




Ø  Apply the patch using opatch command.




Ø  Start the database and db listener.




Take invalid count and compare before patch and after patch, if any issues compile invalids.


Ø  Still more invalids contact oracle support. No invalids

>>Ø  Run the datapatch verbose (* its should run post RU / CPU / major patches )




Ø  Release the instance for business.  

If any invalids compile it using below command.

$ORACLE_HOME/rdbms/admin utlrp.sql

If any errors after apply the patch you can rollback the patch using below command.
opatch rollback -id 36912597

Thanks,
Srini



Friday, 15 November 2024

Oracle Linux Commands (awk/sed /tar/untar/zip/unzip) - part 3/4

In this post i am going to share few of the oracle Linux commands .. i have posted total 4 post for Complete Linux high level commands . this post you can see Part 3/4..

check the previous parts details below .

part 1 : https://anjaniappsdba.blogspot.com/2023/09/oracle-linux-commands-part-14.html

part 2 : https://anjaniappsdba.blogspot.com/2024/02/oracle-linux-commands-part-24.html 



Unix/Linux Awk Commands:

===================

 Awk {print;} filename>>

 Awk '/searchword/' filename 

ex:

-bash-4.2$ awk '/db_name/' awrrpt_1_10_11.html

 <tr><td scope="row" class='awrc'>db_name</td><td class='awrc'>proddb</td><td class='awrc'>&#160;&#160;</td>

 Awk '{print $2,$3;}' filename ( it will print the 2nd and 3rd line of the file )

Awk '{print $2,$5;}' filename ( it will print the 2nd and 5th line of the file )

awk '{print $2,$NF;}' filename

awk '{print $2,$NF;}' awrrpt_1_10_11.html


border="0" Name</th></tr>
scope="row" class='awrc'>&#160;&#160;</td>
class='awrc'> class='awrc'>
 PDB
 </td></tr>
scope="row" class='awrnc'>&#160;&#160;</td>
class='awrnc'> class='awrnc'>
 PDB$SEED
 </td></tr>
scope="row" class='awrc'>&#160;&#160;</td>
class='awrc'> class='awrc'>
 PDB
 </td></tr>
scope="row" cl


Unix Sed Commands : 

====================

Sed 's/oldname/newname/' filename >> to change first occurrence of the each line old name to new name

Sed 's/oldname/newname/2' filename >> to change second occurrence of the each line old name to new name

Sed 's/oldname/newname/g' filename >> to change all occurrence of the each line old name to new name.

Sed –n '/name/p' filename >> to print pattern match the line

 Sed '/^#\|^$| -*#/d' httpd.conf : to empty line file and start the # beginning remove that lines


Linux Rpm Commands

=================

 rpm –ivh rpmpkgname >> to install rpm package independently(with

in dependence)

[root@proddb01 ~]# rpm -qa oracle*

oracleasm-support-2.1.11-2.el7.x86_64

oracle-database-server-12cR2-preinstall-1.0-5.el7.x86_64

oraclelinux-release-el7-1.0-11.el7.x86_64

oracle-logos-70.7.0-1.0.5.el7.noarch

oracle-database-preinstall-19c-1.0-3.el7.x86_64

oracle-database-preinstall-21c-1.0-1.el7.x86_64

oracle-database-preinstall-18c-1.0-1.el7.x86_64

oraclelinux-release-7.8-1.0.7.el7.x86_64



rpm –qa >> to display the all rpm packages installed details

bind-libs-lite-9.11.4-26.P2.el7_9.16.x86_64

urw-base35-nimbus-mono-ps-fonts-20170801-10.el7.noarch

abrt-2.1.11-57.0.1.el7.x86_64

pinentry-0.8.1-17.el7.x86_64

tigervnc-server-minimal-1.8.0-19.0.1.el7.x86_64

flite-1.3-22.el7.x86_64

gnome-screenshot-3.26.0-1.el7.x86_64

tog-pegasus-libs-2.14.1-8.0.1.el7.x86_64

xterm-295-3.el7.x86_64

mod_session-2.4.6-93.0.1.el7.x86_64

libarchive-3.1.2-14.el7_7.x86_64

xorg-x11-drv-void-1.4.1-2.el7.1.x86_64

sos-3.8-6.0.1.el7.noarch

xsettings-kde-0.12.3-7.el7.x86_64

c-ares-1.10.0-3.el7.x86_64

librsvg2-2.40.20-1.el7.x86_64



rpm –q kernel >> it display the kernel version

rpm –e packagename >> to uninstall the rpm package

rpm –l package >> to search the rpm location path




Linux Compressed / uncompressed Commands

============================

tar –cvf filename.tar directory/filepath>> to create tar file

tar -cvf ashrpt_1_0910_1111.html.tar ashrpt_1_0910_1111.html

ashrpt_1_0910_1111.html.tar


tar –xvf filename.tar>> to extract the tar file

bash-4.2$ tar -xvf ashrpt_1_0910_1111.html.tar

tar –cvf filename.tar directory1 directory2 directory3>> to create tar

file multiple directory

tar –xvf filename.tar –d directorypath>> to extract the tar file in

specific location

tar –tvf filename.tar>> to see the contents tar file without extract

tar –czvf filename.tar.gz directory1 directory2 directory3>> to create

tar file multiple directory

tar –xzvf filename.tar.gz>> to extract the tar file

tar –tzvf filename.tar.gz>> to see the contents tar file without extract

zip –r filename.zip directory1 >> to creates zip files

unzip filename.zip >> to unzip the files

unzip –l filename.zip (or) less filename.zip>> to see the content


without extract to see the content


Gzip filename>> to create only the files not directories

Example: gzip filename

Output:filename.gz

Gzip –r directory>> to create only zip In files in directories

Gunzip filename.gz >> to extract the gz file

Tar –cjvf filename.tar.bz filename>> to create bz file

tar –cvf filename.tar file1 file2 >> to create a tar file

tar –xvf filename.tar >> extract the tar file

tar –tvf filename.tar >> to see the content of tar file without extract

tar –cvf filename.war directorypath>> create a tar file

tar –xvf filename.war>> extract the tar file

tar –xvf filename.war –d directorypath>> extract the war file in

specific location

tar –tvf filename.war>> to see the tar file content without extract


Moving data one location to another

================================


Cp >> copy the files or duplicate the files / backup the existing file / folder / directories 

Cp source destintion>> to copy the files one location to another.

Cp -r source destintion>> to copy the directories one location to

another.

mv source destintion>> to cut and paste the files one location to another. Or rename the files /directories


-bash-4.2$ cp test.txt test.txt_old

-bash-4.2$ ls -ltr

total 8

-rw-r--r-- 1 oracle oinstall 20 Nov 15 14:58 test.txt

-rw-r--r-- 1 oracle oinstall 20 Nov 15 14:58 test.txt_old

-bash-4.2$


-bash-4.2$ mv test.txt_old test.txt_new
-bash-4.2$ ls -ltr
total 8
-rw-r--r-- 1 oracle oinstall 20 Nov 15 14:58 test.txt
-rw-r--r-- 1 oracle oinstall 20 Nov 15 14:58 test.txt_new
-bash-4.2$


Linux Common Commands

============================

 pwd >>present working directory

 w>> to display system uptime ,load avg ,how many users

working full information of users

who>>to display the current active users

 whoami>> current user name

who am i>>it gives first login user in the system command

prompt

which command >> to know the execution command location

path

cd>> to go the home directory

 cd ~ >> to go the home directory

 cd ..>> to go the previous directory

cd /somepath>> to go the given path

man >> to given the commands information

 ls >> to display the list of files and directories

 ls –a >> to display the list of files and directories and hidden

directories and files

 ls –l >>

 ls –lt>>it display the files with time based

 ls –ltr>> it display the files with time reverse order

ls –ltrh>> it display the files with human readable format (like

gb,mb)

-bash-4.2$ pwd

/home/oracle/racsinfotech

-bash-4.2$ ls

test.txt

-bash-4.2$ ls -ltr

total 4

-rw-r--r-- 1 oracle oinstall 20 Nov 15 14:58 test.txt

-bash-4.2$



Thanks,

Srini