Tags

11g (3) 12c (4) 18c (2) 19c (3) ASM (3) Critical Patch (13) Dataguard (10) GRID (3) GitLab (2) Linux (11) OEM (2) ORA Errors (16) Oracle (20) RMAN (5)

Friday, July 31, 2026

Critical Patch 19c April 2026

   

Oracle Critical Patch Update on 19c - April 2026

GI RU Combo:

Patch 39062956 - Combo of OJVM Component Release Update 19.31.0.0.260421 + Grid Infrastructure Apr 2026 Release Update 19.31.0.0.260421 (REL-APR2026)


PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

Execute the following commands:

STEP 1

GI RELEASE UPDATE 19.31.0.0.0 (REL-APR2026)

1)
NOTE: IMPORTANT
GI Home:
You need to update first opatch to the higher or latest version.
You can download latest version from the following link.

For April CPU is required OPatch latest version. It can be downloaded by the following link

Download lest OPatch from "https://updates.oracle.com/download/6880880.html"

Latest OPatch copy files.
Grid_home
Als root user:
cd /oracle19/gridbase/grid
unalias mv
cd /oracle19/gridbase/grid
mv OPatch OPatch_OLD
cd $DOWNLOAD_HOME/OPatch_12.2.0.1.51
cp -r  OPatch /oracle19/gridbase/grid
cd /oracle19/gridbase/grid
chown -R oracle:dba OPatch/
su - oracle
. set_home_env +ASM
$ORACLE_HOME/OPatch/opatch version

You Need to do the same on ORACLE_HOME
Oracle ORACLE_HOME
Latest OPatch copy files
Oracle_home:
Als root user:
cd /oracle19/support/download/OPatch_12.2.0.1.51
cd /oracle19/dbbase/db
unalias mv
mv OPatch OPatch_OLD
cd /oracle19/support/download/OPatch_12.2.0.1.51
cp -r  OPatch /oracle19/dbbase/db
cd /oracle19/dbbase/db
chown -R oracle:dba OPatch
su - oracle
. set_home_env ${ORACLE_SID}
$ORACLE_HOME/OPatch/opatch version



Unzip April 2026 combo patch file downloaded.

p39062956_190000_Linux-x86-64.zip

Check the conflict:
From Grid_Home

$DOWNLOAD_PATCH is a directory where the patch is located.

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir  $DOWNLOAD_PATCH/39062956/39036936/39034528

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/39062956/39036936/39039430

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/39062956/39036936/39055473

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/39062956/39036936/39107855

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -
phBaseDir $DOWNLOAD_PATCH/39062956/39036936/39107825


For Database home, as home user
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/39062956/39036936/39034528

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/39062956/39036936/39039430


2)
Shut down all instances and listeners associated with the Oracle home that you are updating.

NOTE:
If you have standby DB. Stop them first and keep it for fallback:

On Standby:
select name, open_mode, database_role from v$database;
select process, status, sequence# from v$managed_standby;
alter database recover managed standby database cancel;
On Primary:
show parameter log_archive_dest_state_2;
alter system set log_archive_dest_state_2=DEFER SCOPE=BOTH;
On Standby:
 shutdown immediate;
 srvctl stop asm -f


On Primary:
STOP DB and PDB from Oracle home:
alter pluggable database KARDBPDB close immediate;
srvctl status database -d KARDBTST
Database is not running.

Stop Listener from GI Home

srvctl stop  listener -l LISTENER
srvctl status listener -l LISTENER
Listener LISTENER is enabled
Listener LISTENER is not running

Stop ASM
srvctl status asm
ASM is not running.

3)
As root user execute the following command.
You have following options
 i) To patch only the GI Home
 <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/patchid -  oh <GI_HOME>

ii) To patch oracle_home
  opatchauto apply <UNZIPPED_PATCH_LOCATION>/patchid -oh <oracle_home1_path>

 iii) Patching Oracle Home and Grid Home togather:
 As root user, execute the following command on each node of the cluster:
 # <GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/patchid

I am going to apply the path for both grid home and oracle home together.

Oracle Document: 
https://updates.oracle.com/Orion/Services/download?type=readme&aru=28686071

NOTE: make sure that the Clusterware has is running:
If it is not running, you need to start it as follow.

crsctl start has

As root user:
cd /users/oracle
. set_home_env +ASM
export PATH=$PATH:$GRID_HOME/OPatch
$GRID_HOME/OPatch/opatchauto apply $DOWNLOAD_PATCH/39062956/39036936

As Grid_Home:
crsctl start res -all
or
srvctl start asm
srvctl start database -db ${ORACLE_SID} 

Post-Installation Instructions
Single/Multitenant (CDB/PDB) DB
sqlplus / as sysdba
startup
alter pluggable database all open;
quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose


Any databases that have invalid objects need to execute utlrp.sql run

For example:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

-- You can check valid or invalid objects with the following command.
set pagesize 250;
col STATUS format a20;
col COMP_NAME format a35;
select COMP_NAME, version, status from dba_registry;


STEP 2
OJVM RELEASE UPDATE 19.31.0.0.0

For a Non Oracle RAC environment, shut down all databases and listeners associated with the Oracle home that you are updating.

From Oracle_home.

Stop DB - no need to stop ASM
alter pluggable database KARDBPDB close immediate;
srvctl stop database -d KARDBTST
srvctl stop  listener -l LISTENER

export PATH=$PATH:/usr/ccs/bin

#$ORACLE_HOME/OPatch/opatch apply $DOWNLOAD_PATCH/39062956/38906621

Post installation Steps.

startup upgrade
alter pluggable database all open upgrade;
exit
cd $ORACLE_HOME/OPatch
./datapatch -verbose
sqlplus / as sysdba
shutdown
startup
alter pluggable database all open;

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

NOTE: If need Roolback the patch:
 opatch rollback -id 38906621
startup
cd $ORACLE_HOME/OPatch
 ./datapatch -verbose
## Roolback End --

==== Patch Apply DONE On Primary DB====

Verify the patch Version and Status of the patch:
col ID format a5
col COMMENTS format a20
col VERSION format a12
col BUNDLE format a5
col ACTION_TIME format a30
col ACTION format a10
set linesize 150
select substr(action_time,1,30) action_time, substr(id,1,8) id, substr(action,1,10) action, substr(version,1,8) version, substr(comments,1,20) comments from sys.registry$history ;



set pagesize 20;
set linesize 200;
col ACTION_TIME format a30;
col DESCRIPTION format a50;
select PATCH_ID,ACTION,ACTION_TIME,DESCRIPTION,STATUS from registry$sqlpatch order by ACTION_TIME ;


select PATCH_ID,DESCRIPTION,STATUS from registry$sqlpatch order by ACTION_TIME ;

OR
GRID_HOEM:
$ORACLE_HOME/OPatch/opatch lspatches -oh ${ORACLE_HOME}
ORACLE_HOME
$ORACLE_HOME/OPatch/opatch lspatches -oh ${ORACLE_HOME}


Patch Apply on Standby DB - Just in case if you have one:

Aapply a patch you might need to execute ONE or TWO steps
== > Patch Oracle binaries < == On BOTH databases : Primary AND Standby
== > Execute post patching step(s) < == On the Primary ONLY
== > A Physical Standby can NOT be modified DIRECTLY == > Only by applying changes received from the Primary database via redo log files

select name, open_mode, database_role from v$database;
select process, status, sequence# from v$managed_standby;
ALTER DATABASE RECOVER  managed standby database  cancel;
shutdown immediate;
srvctl stop asm -f

Patch 1: on binary level
root user:
cd /users/oracle
. set_home_env +ASM
export PATH=$PATH:$GRID_HOME/OPatch
$GRID_HOME/OPatch/opatchauto apply $DOWNLOAD_PATCH/39062956/39036936
start asm
startup mount;

Patch 2: on Standby:
Stop DB - no need to stop ASM
remove alert log

From ORACLE_HOME
export PATH=$PATH:/usr/ccs/bin
$ORACLE_HOME/OPatch/opatch apply  $DOWNLOAD_PATCH/39062956/38906621

Starting logapply on standby:
alter database recover managed standby database disconnect from session;

On Primary:
alter system set log_archive_dest_state_2='ENABLE' scope=both;

Enjoy !

Your comments are most valuable and it would help me to come up with better posts. 


Tuesday, June 16, 2026

How to create swap file

 

How to Create, Verify, and Increase Swap Space on Linux

Swap space is disk space that Linux uses as virtual memory when physical RAM is exhausted. Proper swap configuration helps improve system stability and prevents out-of-memory situations.

PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

What is Swap Space?

Swap is a reserved area on disk that acts as an extension of RAM. When memory usage becomes high, inactive pages can be moved from RAM to swap, freeing memory for active processes.

Benefits of Swap

  • Prevents application crashes due to memory shortages.
  • Provides additional virtual memory.
  • Supports system hibernation (when configured appropriately).
  • Improves system stability during memory spikes.

Check Existing Swap Space

Use any of the following commands to verify current swap configuration and usage.

free -h

Check Active Swap Devices

swapon -s

cat /proc/swaps

swapon --show

Create a New Swap File

This method creates a 2 GB swap file. Adjust the size according to your requirements.

Step 1: Disable Existing Swap (if required)

swapoff -a

Step 2: Create Swap File

sudo fallocate -l 2G /swapfile

Verify file creation:

ls -lh /swapfile

Step 3: Set Correct Permissions

sudo chmod 600 /swapfile

Verify permissions:

ls -l /swapfile

Step 4: Format the File as Swap

sudo mkswap /swapfile

Step 5: Enable Swap

sudo swapon /swapfile

Step 6: Verify Swap Activation

swapon --show

or

free -h

Step 7: Make Swap Persistent After Reboot

Add the following entry to /etc/fstab:

echo "/swapfile none swap sw 0 0" | sudo tee -a /etc/fstab

Verify:

cat /etc/fstab

Expected entry:

/swapfile none swap sw 0 0

Increase Existing Swap Partition

Current swap size: 8GB
Target swap size: 16GB

Step 1: Disable Swap

swapoff -a

Verify:

swapon --show

No output should be displayed.

Step 2: Increase Virtual Disk Size in vCenter

Increate hard disk 1 from 64 to 90 GB

Navigate to VMware vCenter:

VM Settings
→ Hard Disk 1
→ Increase disk size

Example:

64 GB → 90 GB

Step 3: Detect New Disk Size

Check available disk space:

fdisk -l

If the new size is not visible, rescan the disk:

echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan

Run again:

fdisk -l

Step 4: Modify Partitions

Launch partition manager:

cfdisk

Existing Layout

/dev/sda3  Linux filesystem
/dev/sda4 Linux swap

Delete Existing Swap Partition

Select:

/dev/sda4

Choose:

Delete

Resize Root/Data Partition

cfdisk

Select:

/ dev/sda3  # This was a root partition which we increased on vCenter.

Choose:

Resize ==> Write

Create New Swap Partition

Use remaining free space:

New
Type → Linux swap

mkswap /dev/sda4 Setting up swapspace version 1, size = 26 GiB (27917262848 bytes) no label, UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # edit the UUID vi /etc/fstab mount -a swapon /dev/sda4 swapon --show NAME TYPE SIZE USED PRIO /dev/sda4 partition 26G 0B -2

Tuesday, May 26, 2026

ORA-800_VKTM

 

ORA-800_VKTM

 

ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM]

ORA-800_VKTM_Fix


PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

After kernel update on linux system you get ORA-00800 error. In many cases you need to as follow

echo 950000 > /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.rt_runtime_us

The above command will fix the Issue, and you need to restart the DB. But when you reboot your Server the change will lost. Better to add following line in the rc.local file to persistent after reboot.

vi /etc/rc.local
echo 950000 > /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.rt_runtime_us
chmod +x /etc/rc.local

That's it 
I have script, if you have multiple server to fix the issue via jump host-.

#!/bin/bash

if [ -f $1 ]; then
 SERVERLIST=$(cat $1)
else
 SERVERLIST=$1
fi

for i in $SERVERLIST; do
    echo "Processing $i ..."

    ssh -q -T \
        -o ConnectTimeout=1 \
        -o PreferredAuthentications=publickey \
        "$i" /bin/bash --noprofile --norc <<'EOF'

echo 950000 > /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.rt_runtime_us

cat /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.rt_runtime_us

touch /etc/rc.local

grep -q "cpu.rt_runtime_us" /etc/rc.local || cat >> /etc/rc.local <<'EORC'
# Set CPU real-time runtime for Oracle VKTM
echo 950000 > /sys/fs/cgroup/cpu,cpuacct/user.slice/cpu.rt_runtime_us
EORC

chmod +x /etc/rc.local
EOF

done

Critical Patch 19c April 2026

    Oracle Critical Patch Update on 19c - April 2026 GI RU Combo: Patch 39062956 - Combo of OJVM Component Release Update 19.31.0.0.260421 +...