Friday, September 23, 2022

Oracle RAC 21c Installation on VirtualBox

1. Preparation


2. Install packages (on 2 nodes)

# dnf -y install oracle-database-preinstall-21c
# cd /etc/sysctl.d/
# ls -ltr

-rw-r--r--. 1 root root  449 Sep 16 12:26 99-initial-sysctl.conf
-rw-r--r--. 1 root root 1966 Sep 16 12:26 99-oracle-database-preinstall-21c-sysctl.conf

3. Config /etc/hosts on 2 nodes 

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 
192.168.56.11   saigon-01.south.com     saigon-01
192.168.56.22   saigon-02.south.com     saigon-02
 
192.168.56.33   saigon-01-vip.south.com     saigon-01-vip
192.168.56.44   saigon-02-vip.south.com     saigon-02-vip
 
192.168.89.11   saigon-01-priv.south.com     saigon-01-priv
192.168.89.22   saigon-02-priv.south.com     saigon-02-priv
 
 192.168.56.55   saigon-scan.south.com      saigon-scan
192.168.56.66   saigon-scan.south.com      saigon-scan
192.168.56.77   saigon-scan.south.com      saigon-scan

4. Disable SELINUX on 2 nodes

# vi /etc/selinux/config


SELINUX=disabled


5. Stop and disable FIREWALL on 2 nodes

# systemctl stop firewalld.service 
# systemctl disable firewalld.service 

6. Config DNS on 2 nodes

DNS is needed for RAC installation. It is another prerequisite. Because it is TEST environment we will follow below steps on 2 nodes

- dnsmasq Rpm Should Be Installed

[root@saigon-01 ~]# rpm -qa | grep dnsmasq
dnsmasq-2.79-21.el8_6.1.x86_64
 
[root@saigon-01 ~]# systemctl enable dnsmasq
[root@saigon-01 ~]# systemctl start dnsmasq
[root@saigon-01 ~]# systemctl status dnsmasq

 
- Create /etc/racdns File And Enter Below Entries
[root@saigon-01 ~]# vi /etc/racdns
192.168.56.55   saigon-scan.south.com      saigon-scan
192.168.56.66   saigon-scan.south.com      saigon-scan
192.168.56.77   saigon-scan.south.com      saigon-scan
 
[root@saigon-01 ~]# vi /etc/dnsmasq-resolv.conf
nameserver 127.0.0.1
 
- Add addn-hosts=/etc/racdns Entry To /etc/dnsmasq.conf File

# SAIGON - Config for SCAN
except-interface=virbr0
bind-interfaces
addn-hosts=/etc/racdns
resolv-file=/etc/dnsmasq-resolv.conf
local=/south.com/
 
- Edit /etc/resolv.conf file like below
[root@saigon-01 ~]# vi /etc/resolv.conf
# Generated by NetworkManager
#nameserver 127.0.0.1
search south.com
 
- Restart Service To Take Effect Of Changes
[root@saigon-01 ~]# chattr +i /etc/resolv.conf
[root@saigon-01 ~]# systemctl restart dnsmasq.service
 
- Test DNS
[root@saigon-01 ~]# nslookup saigon-scan
Server:         127.0.0.1
Address:        127.0.0.1#53
 
Name:   saigon-scan.south.com
Address: 192.168.56.55
Name:   saigon-scan.south.com
Address: 192.168.56.66
Name:   saigon-scan.south.com
Address: 192.168.56.77
Name:   saigon-scan.south.com
Address: 192.168.56.77
Name:   saigon-scan.south.com
Address: 192.168.56.66
Name:   saigon-scan.south.com
Address: 192.168.56.55

7. NTP configuration on 2 nodes

Chrony is a default NTP client as well as an NTP server on RHEL 8 / CentOS 8.

- Chrony Installation
# dnf install chrony
# systemctl enable chronyd
# systemctl start chronyd.service
# systemctl status chronyd.service

- NTP Server on node 1 (node 1 is used a server as well as client)
[root@saigon-01 ~]# vi /etc/chrony.conf

server 192.168.56.11 iburst
allow 192.168.56.0/24
local stratum 10

[root@saigon-01 ~]# systemctl restart chronyd.service

- NTP Client on node 2
[root@saigon-02 ~]# vi /etc/chrony.conf

server 192.168.56.11 iburst

[root@saigon-02 ~]# systemctl restart chronyd.service

- Checking information
# chronyc tracking 
[root@saigon-01 ~]# chronyc sources
[root@saigon-01 ~]# chronyc clients

Note: With Oracle Linux 8.6, maybe there is error on Chrony server. You must config another server as ntp server for 2 nodes.

8. Disabling Transparent HugePages on 2 nodes
  • Transparent HugePages can cause memory allocation delays during runtime. 
  • To avoid performance issues, Oracle recommends that you disable Transparent HugePages on all Oracle Database servers. Oracle recommends that you instead use standard HugePages for enhanced performance.
# cat /sys/kernel/mm/transparent_hugepage/enabled 
always madvise [never]

9. Create User Accounts & Groups on 2 nodes
  • Some groups and oracle user were created after installing oracle-database-preinstall-21c package
  • We create some missing groups and grid user

# groupadd --gid 54327 asmdba
# groupadd --gid 54328 asmoper
# groupadd --gid 54329 asmadmin
# useradd --uid 54322 --gid oinstall --groups dba,asmadmin,asmdba,asmoper,racdba grid
# usermod -a -G asmdba oracle

 
# passwd oracle
# passwd grid

10. Create and Set permissions for directories on 2 node

# mkdir -p /u01/app/21.0.0/grid
# mkdir -p /u01/app/grid
# mkdir -p /u01/app/oracle/product/21.0.0/db_1
# chown -R grid.oinstall /u01
# chown -R oracle.oinstall /u01/app/oracle
# chmod -R 775 /u01

11. Update Oracle & Grid users profiles on 2 node

[oracle@saigon-01 ~]$ vi .bash_profile

# User specific environment and startup programs
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/21.0.0/db_1
export ORACLE_SID=saigon1 / saigon2
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/sbin:$PATH
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export NLS_LANG="AMERICAN_AMERICA.AL32UTF8"

[grid@saigon-01 ~]$ vi .bash_profile

# User specific environment and startup programs
export ORACLE_SID=+ASM1 / +ASM2
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/21.0.0/grid
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export NLS_LANG="AMERICAN_AMERICA.AL32UTF8"
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=${PATH}:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$HOME/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib:$ORACLE_HOME/oracm/lib:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export TEMP=/tmp
export TMPDIR=/tmp
umask 022

12. Config ASM disks

- Allocate disks. Mount disks on 2 nodes
- Format disk (fdisk) on node 1
- Using UDEV to configure on 2 nodes

Get PARTUUID
[root@saigon-01 ~]# blkid
/dev/sdb1: PARTUUID="6d8fb7f5-01"
/dev/sdc1: PARTUUID="0a68bcf3-01"
/dev/sdd1: PARTUUID="f718843f-01"
/dev/sde1: PARTUUID="1a5b93c0-01"
/dev/sdf1: PARTUUID="bc37fb1a-01"
 
Create rule file on 2 nodes
# vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sdb1", ENV{ID_PART_ENTRY_UUID}=="6d8fb7f5-01", SYMLINK+="oracleasm/disks/asm-ocr-01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc1", ENV{ID_PART_ENTRY_UUID}=="0a68bcf3-01", SYMLINK+="oracleasm/disks/asm-ocr-02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdd1", ENV{ID_PART_ENTRY_UUID}=="f718843f-01", SYMLINK+="oracleasm/disks/asm-ocr-03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", ENV{ID_PART_ENTRY_UUID}=="1a5b93c0-01", SYMLINK+="oracleasm/disks/asm-data", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", ENV{ID_PART_ENTRY_UUID}=="bc37fb1a-01", SYMLINK+="oracleasm/disks/asm-reco", OWNER="grid", GROUP="asmadmin", MODE="0660"
 
Loading configuration on 2 nodes
# udevadm control --reload-rules
# udevadm trigger
# ls -l /dev/oracleasm/disks/

total 0
lrwxrwxrwx 1 root root 10 Sep 16 23:14 asm-data -> ../../sde1
lrwxrwxrwx 1 root root 10 Sep 16 23:14 asm-ocr-01 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 16 23:14 asm-ocr-02 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Sep 16 23:14 asm-ocr-03 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Sep 16 23:14 asm-reco -> ../../sdf1
 
# ls -lL /dev/oracleasm/disks/
total 0
brw-rw---- 1 grid asmadmin 8, 65 Sep 16 23:14 asm-data
brw-rw---- 1 grid asmadmin 8, 17 Sep 16 23:14 asm-ocr-01
brw-rw---- 1 grid asmadmin 8, 33 Sep 16 23:14 asm-ocr-02
brw-rw---- 1 grid asmadmin 8, 49 Sep 16 23:14 asm-ocr-03
brw-rw---- 1 grid asmadmin 8, 81 Sep 16 23:14 asm-reco

13. INSTALLING ORACLE GRID INFRASTRUCTURE

[root@saigon-01 ~]$ dnf install tigervnc-server
[root@saigon-01 21c]# su - grid
[grid@saigon-01 21c]$ cd /source/21c/
[grid@saigon-01 21c]$ unzip LINUX.X64_213000_grid_home.zip -d $ORACLE_HOME
 
[grid@saigon-01 ~]$ vncserver
[grid@saigon-01 grid]$ ./gridSetup.sh

 
Check information
[grid@saigon-01 ~]$ ps -ef | grep d.bin
[grid@saigon-01 ~]$ crsctl stat res -t
[grid@saigon-01 ~]$ crsctl check cluster

CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
 
[grid@saigon-01 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   b0c6de26c7c24f1dbf29272e137cfeb5 (AFD:OCR1) [OCR]
 2. ONLINE   ecca33c1fbd24ff3bfe3c910a8b54454 (AFD:OCR2) [OCR]
 3. ONLINE   a3af404612e74fecbf1f2c5bbadbdb4f (AFD:OCR3) [OCR]
Located 3 voting disk(s).
 
[grid@saigon-01 ~]$ olsnodes -n
saigon-01       1
saigon-02       2
 
[grid@saigon-01 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     901284
         Used space (kbytes)      :      85124
         Available space (kbytes) :     816160
         ID                       :  890896235
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded
 
                                    Device/File not configured
 
                                    Device/File not configured
 
                                    Device/File not configured
 
                                    Device/File not configured
 
         Cluster registry integrity check succeeded
 
         Logical corruption check bypassed due to non-privileged user
 
[grid@saigon-01 ~]$ oifcfg getif
enp0s3  192.168.56.0  global  public
enp0s8  192.168.89.0  global  cluster_interconnect,asm

14. INSTALLING ORACLE 21C DATABASE SOFTWARE

[oracle@saigon-01 ~]$ cd /source/21c/

[oracle@saigon-01 ~]$ unzip LINUX.X64_213000_db_home.zip -d $ORACLE_HOME 

[oracle@saigon-01 ~]$ cd $ORACLE_HOME 

[oracle@saigon-01 ~]$ ./runInstaller

15. CREATE DATABASE

[oracle@saigon-01 ~]$ dbca

Patch 34155589 - GI Release Update 21.7.0.0.220719

1. OPatch Utility (on 2 nodes) for both ORACLE_HOME and GRID_HOME
 
$ unzip p6880880_210000_Linux-x86-64.zip -d $ORACLE_HOME
 
$ opatch version

OPatch Version: 12.2.0.1.30
 
OPatch succeeded.
 
$ opatch lsinventory -detail -oh $ORACLE_HOME
 
On node 1
[oracle@saigon-01 ~]$ opatch lsinventory
[grid@saigon-01 ~]$ opatch lsinventory


On node 2 
[oracle@saigon-02 ~]$ opatch lsinventory
[grid@saigon-02 ~]$ opatch lsinventory

 
2. Download and Unzip the Patch
 
[grid@saigon-01 21c]$ ll
total 7024516
-rw-r--r-- 1 grid oinstall 3109225519 May  4 11:41 LINUX.X64_213000_db_home.zip
-rw-r--r-- 1 grid oinstall 2422217613 May  4 12:08 LINUX.X64_213000_grid_home.zip
-rw-r--r-- 1 grid oinstall 1537529216 Jul 21 14:46 p34155589_210000_Linux-x86-64.zip
-rw-r--r-- 1 grid oinstall  124109254 May  4 12:12 p6880880_210000_Linux-x86-64.zip
 
[grid@saigon-01 21c]$ unzip p34155589_210000_Linux-x86-64.zip
 
3. Run OPatch Conflict Check

4. Run OPatch System Space Check

5. Patching Oracle RAC Database Homes and GI Together
 
Case 1: Oracle RAC, where the GI Home and the Database Homes are not shared and ACFS file system is not configured.
As root user, execute the following command on each node of the cluster:
 
On node 1:
[root@saigon-01 ~]# /u01/app/21.0.0/grid/OPatch/opatchauto apply /source/21c/34155589/

On node 2:
 [root@saigon-02 ~]# /u01/app/21.0.0/grid/OPatch/opatchauto apply /source/21c/34155589/

 The log sample on node 2:

OPatchauto session is initiated at Wed Sep 21 11:55:05 2022

 

System initialization log file is /u01/app/21.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2022-09-21_11-55-07AM.log.

 

Session log file is /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/opatchauto2022-09-21_11-55-32AM.log

The id for this session is T9PS

 

Executing OPatch prereq operations to verify patch applicability on home /u01/app/21.0.0/grid

 

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/21.0.0/db_1

Patch applicability verified successfully on home /u01/app/oracle/product/21.0.0/db_1

 

Patch applicability verified successfully on home /u01/app/21.0.0/grid

 

 

Executing patch validation checks on home /u01/app/21.0.0/grid

Patch validation checks successfully completed on home /u01/app/21.0.0/grid

 

 

Executing patch validation checks on home /u01/app/oracle/product/21.0.0/db_1

Patch validation checks successfully completed on home /u01/app/oracle/product/21.0.0/db_1

 

 

Updating OJVM libraries on all hosts

Successfully updated OJVM libraries on all hosts

 

 

Verifying SQL patch applicability on home /u01/app/oracle/product/21.0.0/db_1

SQL patch applicability verified successfully on home /u01/app/oracle/product/21.0.0/db_1

 

 

Preparing to bring down database service on home /u01/app/oracle/product/21.0.0/db_1

Successfully prepared home /u01/app/oracle/product/21.0.0/db_1 to bring down database service

 

 

Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/21.0.0/grid

Prepatch operation log file location: /u01/app/grid/crsdata/saigon-02/crsconfig/crs_prepatch_apply_inplace_saigon-02_2022-09-21_11-56-59AM.log

CRS service brought down successfully on home /u01/app/21.0.0/grid

 

 

Performing prepatch operation on home /u01/app/oracle/product/21.0.0/db_1

Perpatch operation completed successfully on home /u01/app/oracle/product/21.0.0/db_1

 

 

Start applying binary patch on home /u01/app/oracle/product/21.0.0/db_1

Binary patch applied successfully on home /u01/app/oracle/product/21.0.0/db_1

 

 

Performing postpatch operation on home /u01/app/oracle/product/21.0.0/db_1

Postpatch operation completed successfully on home /u01/app/oracle/product/21.0.0/db_1

 

 

Start applying binary patch on home /u01/app/21.0.0/grid

Binary patch applied successfully on home /u01/app/21.0.0/grid

 

 

Performing postpatch operations on CRS - starting CRS service on home /u01/app/21.0.0/grid

Postpatch operation log file location: /u01/app/grid/crsdata/saigon-02/crsconfig/crs_postpatch_apply_inplace_saigon-02_2022-09-21_12-05-55AM.log

CRS service started successfully on home /u01/app/21.0.0/grid

 

 

Preparing home /u01/app/oracle/product/21.0.0/db_1 after database service restarted

No step execution required.........

 

 

Trying to apply SQL patch on home /u01/app/oracle/product/21.0.0/db_1

SQL patch applied successfully on home /u01/app/oracle/product/21.0.0/db_1

 

OPatchAuto successful.

 

--------------------------------Summary--------------------------------

 

Patching is completed successfully. Please find the summary as follows:

 

Host:saigon-02

RAC Home:/u01/app/oracle/product/21.0.0/db_1

Version:21.0.0.0.0

Summary:

 

==Following patches were SKIPPED:

 

Patch: /source/21c/34155589/34174046

Reason: This patch is not applicable to this specified target type - "rac_database"

 

Patch: /source/21c/34155589/34327014

Reason: This patch is not applicable to this specified target type - "rac_database"

 

Patch: /source/21c/34155589/34320616

Reason: This patch is not applicable to this specified target type - "rac_database"

 

Patch: /source/21c/34155589/34172227

Reason: This patch is not applicable to this specified target type - "rac_database"

 

 

==Following patches were SUCCESSFULLY applied:

 

Patch: /source/21c/34155589/34160444

Log: /u01/app/oracle/homes/OraDB21Home1/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-58-37AM_1.log

 

Patch: /source/21c/34155589/34172231

Log: /u01/app/oracle/homes/OraDB21Home1/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-58-37AM_1.log

 

 

Host:saigon-02

CRS Home:/u01/app/21.0.0/grid

Version:21.0.0.0.0

Summary:

 

==Following patches were SUCCESSFULLY applied:

 

Patch: /source/21c/34155589/34160444

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_12-02-25PM_1.log

 

Patch: /source/21c/34155589/34172227

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_12-02-25PM_1.log

 

Patch: /source/21c/34155589/34172231

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_12-02-25PM_1.log

 

Patch: /source/21c/34155589/34174046

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_12-02-25PM_1.log

 

Patch: /source/21c/34155589/34320616

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_12-02-25PM_1.log

 

Patch: /source/21c/34155589/34327014

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_12-02-25PM_1.log

 

 

 

OPatchauto session completed at Wed Sep 21 12:37:01 2022

Time taken to complete the session 41 minutes, 57 seconds

 

Start applying binary patch on home /u01/app/21.0.0/grid

Binary patch applied successfully on home /u01/app/21.0.0/grid

 

 

Performing postpatch operations on CRS - starting CRS service on home /u01/app/21.0.0/grid

Postpatch operation log file location: /u01/app/grid/crsdata/saigon-01/crsconfig/crs_postpatch_apply_inplace_saigon-01_2022-09-21_11-36-34AM.log

CRS service started successfully on home /u01/app/21.0.0/grid

 

 

Preparing home /u01/app/oracle/product/21.0.0/db_1 after database service restarted

No step execution required.........

 

 

Trying to apply SQL patch on home /u01/app/oracle/product/21.0.0/db_1

SQL patch applied successfully on home /u01/app/oracle/product/21.0.0/db_1

 

OPatchAuto successful.

 

--------------------------------Summary--------------------------------

 

Patching is completed successfully. Please find the summary as follows:

 

Host:saigon-01

RAC Home:/u01/app/oracle/product/21.0.0/db_1

Version:21.0.0.0.0

Summary:

 

==Following patches were SKIPPED:

 

Patch: /source/21c/34155589/34174046

Reason: This patch is not applicable to this specified target type - "rac_database"

 

Patch: /source/21c/34155589/34327014

Reason: This patch is not applicable to this specified target type - "rac_database"

 

Patch: /source/21c/34155589/34320616

Reason: This patch is not applicable to this specified target type - "rac_database"

 

Patch: /source/21c/34155589/34172227

Reason: This patch is not applicable to this specified target type - "rac_database"

 

 

==Following patches were SUCCESSFULLY applied:

 

Patch: /source/21c/34155589/34160444

Log: /u01/app/oracle/homes/OraDB21Home1/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-28-30AM_1.log

 

Patch: /source/21c/34155589/34172231

Log: /u01/app/oracle/homes/OraDB21Home1/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-28-30AM_1.log

 

 

Host:saigon-01

CRS Home:/u01/app/21.0.0/grid

Version:21.0.0.0.0

Summary:

 

==Following patches were SUCCESSFULLY applied:

 

Patch: /source/21c/34155589/34160444

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-32-34AM_1.log

 

Patch: /source/21c/34155589/34172227

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-32-34AM_1.log

 

Patch: /source/21c/34155589/34172231

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-32-34AM_1.log

 

Patch: /source/21c/34155589/34174046

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-32-34AM_1.log

 

Patch: /source/21c/34155589/34320616

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-32-34AM_1.log

 

Patch: /source/21c/34155589/34327014

Log: /u01/app/21.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2022-09-21_11-32-34AM_1.log

 

 OPatchauto session completed at Wed Sep 21 11:41:30 2022

Time taken to complete the session 19 minutes, 33 seconds

Note: If there is error while patching Oracle Database Software, such as “CheckActiveFilesAndExecutables” failed, do following:

- OPatch Apply/Rollback Errors: 'Prerequisite check "CheckActiveFilesAndExecutables" failed' OPatch fails with error code = 41 or 74 (Doc ID 747049.1)

- https://nenadnoveljic.com/blog/troubleshooting-tfa-start/

- Stop TFA on both nodes: # systemctl stop oracle-tfa.service 

6. Loading Modified SQL Files into the Database

- Start CDB and all PDBs

- Executing following command on one node:

    [oracle@saigon-01 ~]$ datapatch -verbose

7. Re-check after patching

- Using Opatch

$ opatch lsinventory
$ opatch lsinventory -details
$ opatch lspatches

- Using SQL*Plus

set line 200
col action format a10
col status format a10
col version format a10
col action_time format a30
col description format a65

SQL> select patch_id, patch_uid, action, status, action_time, description from dba_registry_sqlpatch;
 
  PATCH_ID  PATCH_UID ACTION     STATUS     ACTION_TIME                    DESCRIPTION
---------- ---------- ---------- ---------- ------------------------------ -----------------------------------------------------------------
  34160444   24850944 APPLY      SUCCESS    21-SEP-22 12.36.43.459154 PM   Database Release Update : 21.7.0.0.220719 (34160444)


- Using ASM tools

[grid@saigon-01 ~]$ kfod op=PATCHES
---------------
List of Patches
===============
34160444
34172227
34172231
34174046
34320616
34327014
 
[grid@saigon-01 ~]$ kfod op=PATCHLVL
-------------------
Current Patch level
===================
260588894