Oracle 18c to 19c Data Guard Upgrade
Upgrade Data Guard configurations from 18c to 19c.
During oracle data guard upgrade, the standby database(s) can be upgraded implicitly via the redo from the primary database, and there is no need to rebuild the standby database after upgrade.
Install the new Oracle Home on both primary and standby
Before Upgrade
Stop Data Guard: On primary database, defer the redo log transport to the standby
On Primary:
===========
SQL> show parameter log_archive_dest_2
SQL> alter system set log_archive_dest_state_2='defer' scope=both;Cancel redolog apply on standby and shutdown the database
On Standby:
===========
SQL> alter database recover managed standby database cancel;
SQL> Shut immediate;Upgrade Primary Database
Install the 19c pre-install package on both primary & standby server
On Primary & Standby:
=====================
yum install -y oracle-database-preinstall-19cInstall Oracle 19c on Primary
Unzip the 19c software under 19c home and start the runInstaller
cd /u01/app/oracle/product/19.3/db_home
unzip LINUX.X64_193000_db_home.zip
./runinstaller







Purge the RECYCLEBIN and also check the pre-upgrade summary

Create a guaranteed restore point

Start DBUA on Primary
We wills tart DBUA from 19c home to upgrade 18c database to 19c version










Post Oracle Data Guard Upgrade
Install new home in standby, Update the listener on the standby host. Be sure to update the Oracle Home information in the listener.ora
vi $ORACLE_HOME/network/admin/listener.ora
lsnrctl reloadexport OLD_HOME=/u01/app/oracle/product/18.3/db_home
export NEW_HOME=/u01/app/oracle/product/19.3/db_home
export ORACLE_HOME=$NEW_HOME
export ORACLE_SID=prod#Set ORACLE_UNQNAME to DB_UNIQUE_NAME
export ORACLE_UNQNAME=standbyCopy TNS
#Back up files
cp $NEW_HOME/network/admin/tnsnames.ora
$NEW_HOME/network/admin/tnsnames.ora.backup
#Copy from old to new home
cp $OLD_HOME/network/admin/tnsnames.ora
$NEW_HOME/network/adminNow, you can edit /etc/oratab and update the information about the
Oracle Home to match the new Oracle Home
vi /etc/oratabCopy SPFile and password file to the new Oracle Home
cp $OLD_HOME/dbs/orapw $ORACLE_SID $ORACLE_HOME/dbs
cp $OLD_HOME/dbs/spfile $ORACLE_SID.ora
$ORACLE_HOME/dbsStart the database
SQL> startup mountEnable Redo Log Transport and Apply
On the primary database re-enable redo log transport to standby
database
SQL> alter system set log_archive_dest_state_2='enable'
scope=both;On the standby database restart redo apply
SQL> alter database recover managed standby database
disconnect from session;Thank You!!

.png)