Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label Critical Patch. Show all posts
Showing posts with label Critical Patch. Show all posts

Friday, March 24, 2023

Oracle January Patch 19 2023

  

Oracle January Patch 19 2023

Oracle Critical Patch Update on 19c - January 2023

Oracle Critical Patch Update (CPU)

Patch 34773504 - Combo of OJVM Component Release Update 19.18.0.0.230117 + Grid Infrastructure Jan 2023 Release Update 19.18.0.0.230117


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

Patch 34762026 - GI Release Update 19.18.0.0.230117 (REL-JAN230131)

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

For JAN CPU use latest OPatch Version "OPatch 12.2.0.1.36 for DB 19.0.0.0.0 (Jan 2023)". 

Download Latest OPatch from "Download Latest OPatch"

Latest OPatch copy files.
p6880880_190000_Linux-x86-64.zip

cd $GRID_HOME
mv OPatch OPatch_old
cd $DOWNLOAD_PATCH/OPatch
cp -r OPatch $GRID_HOME

You Need to do the same on ORACLE_HOME
Oracle ORACLE_HOME
Latest OPatch copy files

cd $ORACLE_HOME
mv OPatch OPatch_old
cd $DOWNLOAD_HOME/OPatch
cp -r OPatch $ORACLE_HOME


Unzip January patch file downloaded.
p34762026_190000_Linux-x86-64.zip

Check the conflict:
From Grid_Home

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir  $DOWNLOAD_PATCH/34762026/34765931

Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session


Oracle Home       : /u02/oracle/app/home/product/19.0.0/grid_19

Central Inventory :$ORACLE_BASE/app/oraInventory
   from           :$GRID_HOME/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : $GRID_HOME/cfgtoollogs//opatch/opatchxxxx

Invoking prereq "checkconflictagainstohwithdetail"


Prereq "checkConflictAgainstOHWithDetail" passed.


OPatch succeeded.

I am not going to add  output of all commands. The output should looks like as above.

$DOWNLOAD_PATCH is a directory where the patch is located.

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/34762026/34768559
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/34762026/34768569
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/34762026/34863894
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/34762026/33575402


For Database home, as home user
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/34762026/34765931
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/34762026/34768559


2)
Shut down all instances and listeners associated with the Oracle home that you are updating.
Stop a PDB from Oracle home:
alter pluggable database KARDBPDB close immediate;
srvctl stop database -d KARDBTST
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 stop asm -f
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>/34762026 -  oh <GI_HOME>

ii) To patch oracle_home
  opatchauto apply <UNZIPPED_PATCH_LOCATION>/34762026 -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>/34762026

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

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

crsctl start has

export PATH=$PATH:$GRID_HOME/OPatch
$GRID_HOME/OPatch/opatchauto apply $DOWNLOAD_PATCH/34762026

Post-Installation Instructions
For the both Single/Multitenant (CDB/PDB) DB required following steps.

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
Patch 34786990 - Oracle JavaVM Component Release Update 19.18.0.0.230117

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

From Oracle_home.
Normally no need to stop ASM. You need to just stop the DB and Listener

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/34786990

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


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

$ORACLE_HOME/OPatch/opatch lspatches |sort

==== DONE ====

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 ;



Enjoy !

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

Monday, February 14, 2022

January Patch 12c 2022

 

Oracle Critical Patch Update on 12c - January 2022

Oracle Critical Patch Update (CPU)

Patch 33559966 - Combo of OJVM Component Release Update 12.2.0.1.220118 + Grid Infrastrusture Jan 2022 Release Update 12.2.0.1.220118


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

Patch 33583921 - GI Jan 2022 Release Update 12.2.0.1.220118

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

For January CPU is required OPatch version OPatch_12.2.0.1.29_12c_2022.

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

Latest OPatch copy files.
p6880880_122010_Linux-x86-64.zip

Grid_home:

$ORACLE_HOME/OPatch/opatch version
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
cp -r OPatch $ORACLE_HOME

You Need to do the same on ORACLE_HOME
Oracle ORACLE_HOME
Latest OPatch copy files.

$ORACLE_HOME/OPatch/opatch version
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
cd $DOWNLOAD_HOME/OPatch
cp -r OPatch $ORACLE_HOME

Check the version:
$ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.29

OPatch succeeded.


Unzip January patch file downloaded.
p33559966_122010_Linux-x86-64.zip

Check the conflict:
From Grid_Home

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir  $DOWNLOAD_PATCH/33583921/33587128

Oracle Interim Patch Installer version 12.2.0.1.29
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session


Oracle Home       : /u02/oracle/app/home/product/19.0.0/grid_19

Central Inventory :$ORACLE_BASE/app/oraInventory
   from           :$GRID_HOME/oraInst.loc
OPatch version    : 12.2.0.1.29
OUI version       : 12.2.0.1.4
Log file location : $GRID_HOME/cfgtoollogs/opatch/opatchxxxx
Invoking prereq "checkconflictagainstohwithdetail"


Prereq "checkConflictAgainstOHWithDetail" passed.


OPatch succeeded.

I am not going to add  output of all commands. The output should looks like as above.

$DOWNLOAD_PATCH is a directory where the patch is located.

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/33583921/33678030
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/33583921/33116894
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/33583921/26839277
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/33583921/33610989


For Database home, as home user
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/33583921/33587128
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/33583921/33678030


2)
Shut down all instances and listeners associated with the Oracle home that you are updating.
Stop a PDB from Oracle home:
alter pluggable database KARDBPDB close immediate;
srvctl stop database -d KARDBTST
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 stop asm -f
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>/33583921 -  oh <GI_HOME>

ii) To patch oracle_home
  opatchauto apply <UNZIPPED_PATCH_LOCATION>/33583921 -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>/33583921

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

NOTE: make sure that the Clusterware is running:
crsctl stat res -t
If it is not running, you need to start it as follow.

crsctl start has

export PATH=$PATH:$GRID_HOME/OPatch
$GRID_HOME/OPatch/opatchauto apply $DOWNLOAD_PATCH/33559966/33583921


srvctl start asm

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
Patch 33561275 - Oracle JavaVM Component Release Update 12.2.0.1.220118


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

From Oracle_home.
Normally no need to stop ASM. You need to just stop the DB and Listener

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/33559966/33561275

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

==== DONE ====

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 ;

Completed

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

Wednesday, March 10, 2021

Upgrade Database with Physical Standby

Upgrade Database with Physical Standby 

How to Upgrade Database with Physical Standby

How do I upgrade or patch my physical standby database


Which steps are required for Physical Standby DB, when you want it to upgrade with Primary DB or you want to path the both Primary and Standby DB's

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. 

Those are the highlevel steps:

REFERENCE

===========

Oracle Reference Guide

Patching, Upgrading, and Downgrading Databases in an Oracle Data Guard Configuration


ACTION PLAN

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

You can upgrade in TWO different ways

1. Using a Physical Standby database as your backup

== > Verify the Primary and Standby databases are in SYNC by comparing results of these 3 queries

Primary: SQL > alter system archive log current;

Primary: SQL> select thread#, max(sequence#) "Last Primary Seq Generated"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change# group by thread# order by 1;

PhyStdby:SQL> select thread#, max(sequence#) "Last Standby Seq Received"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change# group by thread# order by 1;


PhyStdby:SQL>select thread#, max(sequence#) "Last Standby Seq Applied"
from v$archived_log val, v$database vdb
where val.resetlogs_change# = vdb.resetlogs_change#
and val.applied in ('YES','IN-MEMORY') group by thread# order by 1;


== > Standby: stop Managed Recovery == > SQL > recover managed standby database CANCEL

         select name, open_mode, database_role from v$database;

select process, status, sequence# from v$managed_standby;

         alter database recover managed standby database cancel;

== > Standby: shut down the database

== > Primary : DEFER log shipping

     alter system set log_archive_dest_state_2=DEFER SCOPE=BOTH;

== > Primary : shut down the database instance

== > Primary : change your environmental variables ==> Variables that point to the current ORACLE_HOME == > $ORACLE_HOME . $TNS_ADMIN as well all files you need to have in the new $OH

     tnsnames.ora

     listener.ora

     sqlnet.ora

     parameter file

     password file


== > Primary : bring up the database instance == > SQL > startup

== > Primary : execute post-patching steps


== > Primary : verify the process is SUCCESSFULLY completed


== > Standby: change your environmental variables

     tnsnames.ora

     listener.ora

     sqlnet.ora

     parameter file

     password file

 

== > Standby: mount the database instance == > SQL > startup mount

== > Standby: start Managed Recovery == > SQL > recover managed standby database                                                                                                                DISCONNECT

 == > online redolog apply via redologs     
alter database recover managed standby database using current logfile disconnect from session;              

== > logapply     via arcive log  
ALTER DATABASE RECOVER  managed standby database  parallel 10 disconnect;  


== > Primary : ENABLE log shipping

     alter system set log_archive_dest_state_2=enable scope=both;


== > Verify the Primary and Standby databases are in SYNC by comparing results of these 3 queries

+++++++++++++++++++

2. Patching the databases at the SAME TIME


== > Primary : DEFER log shipping


== > Standby: stop Managed Recovery == > SQL > recover managed standby database CANCEL

== > Standby: shut down the database

== > Standby: change your environmental variables

== > Standby: mount the database instance == > SQL > startup mount

== > Standby: start Managed Recovery == > SQL > recover managed standby database DISCONNECT


== > Primary : shut down the database instance

== > Primary : change your environmental variables

== > Primary : bring up the database instance == > SQL > startup

== > Primary : ENABLE log shipping

== > Primary : execute post-patching steps


== > Verify the Primary and Standby databases are in SYNC by comparing results of these 3 queries

+++++++++++++++

Of course, you shall have all necessary files under your new $ORCALE_HOME


To apply 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


Monday, January 4, 2021

Oracle CPU 12c October 2020

  

Oracle Critical Patch Update on 12c - October 2020

Oracle Critical Patch Update (CPU)

Patch 31720486 - Combo of OJVM Component Release Update 12.2.0.1.201020 + Grid Infrastrusture Oct 2020 Release Update 12.2.0.1.201020


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

Patch 31750094 - GI Oct 2020 Release Update 12.2.0.1.201020

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

For October CPU is required OPatch version 12.2.0.1.21.

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

Latest OPatch copy files.
p6880880_122010_Linux-x86-64.zip

Grid_home:

$ORACLE_HOME/OPatch/opatch version
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
cp -r OPatch $ORACLE_HOME

You Need to do the same on ORACLE_HOME
Oracle ORACLE_HOME
Latest OPatch copy files.

$ORACLE_HOME/OPatch/opatch version
mv $ORACLE_HOME/OPatch $ORACLE_HOME/OPatch_old
cd $DOWNLOAD_HOME/OPatch
cp -r OPatch $ORACLE_HOME


Unzip OCTOBER patch file downloaded.
p31750094_122010_Linux-x86-64.zip

Check the conflict:
From Grid_Home

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir  $DOWNLOAD_PATCH/31750094/31741641

Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session


Oracle Home       : /u02/oracle/app/home/product/19.0.0/grid_19

Central Inventory :$ORACLE_BASE/app/oraInventory
   from           :$GRID_HOME/oraInst.loc
OPatch version    : 12.2.0.1.21
OUI version       : 12.2.0.7.0
Log file location : $GRID_HOME/cfgtoollogs/opatch/opatch2020-11-14_10-21-18PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"


Prereq "checkConflictAgainstOHWithDetail" passed.


OPatch succeeded.

I am not going to add  output of all commands. The output should looks like as above.

$DOWNLOAD_PATCH is a directory where the patch is located.

$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/31750094/31802727
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/31750094/31749575
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/31750094/26839277
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/31750094/31805785


For Database home, as home user
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/1750094/31741641
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir $DOWNLOAD_PATCH/31750094/31802727


2)
Shut down all instances and listeners associated with the Oracle home that you are updating.
Stop a PDB from Oracle home:
alter pluggable database KARDBPDB close immediate;
srvctl stop database -d KARDBTST
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 stop asm -f
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>/31750094 -  oh <GI_HOME>

ii) To patch oracle_home
  opatchauto apply <UNZIPPED_PATCH_LOCATION>/31750094 -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>/31750094

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

NOTE: make sure that the Clusterware is running:
crsctl stat res -t
If it is not running, you need to start it as follow.

crsctl start has

export PATH=$PATH:$GRID_HOME/OPatch
$GRID_HOME/OPatch/opatchauto apply $DOWNLOAD_PATCH/31750094

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
Patch 31668898 - Oracle JavaVM Component Release Update 12.2.0.1.201020

p31668898_122010_Linux-x86-64.zip

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

From Oracle_home.
Normally no need to stop ASM. You need to just stop the DB and Listener

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/31668898

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

==== DONE ====

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 ;
  PATCH_ID ACTION     ACTION_TIME                    DESCRIPTION                                             STATUS
---------- ---------- ------------------------------ -------------------------------------------------------
 14-NOV-20 10.19.15.778089 PM   0     jvmpsu.sql 12.2.0.1     RAN jvmpsu.sql
14-NOV-20 11.49.15.788284 PM   0     ROLLBACK   12.2.0.1     OJVM PSU post-deinst
14-NOV-20 12.39.15.883467 PM   0     APPLY      12.2.0.1     OJVM PSU post-instal



Enjoy !

physical standby without duplicate command

physical standby without duplicate command create a physical standby database using RMAN without using duplicate command PURPOSE:   All docu...