Monday, June 26, 2023

Change Oracle Database Compatible Parameter in Primary and Standby Servers

To change the compatibility parameter to 19.0.0.0 on both Primary and Standby servers, follow the below steps. Please note that this process requires database downtime. Begin by changing the compatibility in Standby, followed by the Primary server.


SQL> SELECT value FROM v$parameter WHERE name = 'compatible';

VALUE
-------------------------------------------------------------
12.2.0

ALTER SYSTEM SET COMPATIBLE= '19.0.0.0' SCOPE=SPFILE SID='*';

Bounce the Standby database in the mounted state and restart the Managed Recovery Process.

[oracle@sajidserver01 ~]$ srvctl stop database -d sajid_texas
[oracle@sajidserver01 ~]$ srvctl start database -d sajid_texas -o mount


alter database recover managed standby database disconnect from session;

Now change the compatibility on the Primary database, make sure you get a proper rman backup of your database before doing it. If you want to revert back to the compatibility.

ALTER SYSTEM SET COMPATIBLE= '19.0.0.0' SCOPE=SPFILE SID='*';

Bounce the Primary database now and make sure there is no lag in DGMGRL.

[oracle@sajidserver01 ~]$ srvctl stop database -d sajid_pittsburgh
[oracle@sajidserver01 ~]$ srvctl start database -d sajid_pittsburgh

SQL> SELECT value FROM v$parameter WHERE name = 'compatible';

VALUE
-------------------------------------------------------------
19.0.0.0

DGMGRL> show configuration;
Configuration - SAJID_CONF
  Protection Mode: MaxPerformance
  Members:
  sajid_pittsburgh - Primary database
  sajid_texas - Physical standby database
Fast-Start Failover:  Disabled
Configuration Status:
SUCCESS   (status updated 50 seconds ago)

Your Database compatibility at this stage is changed to 19.0.0.0. It is one Pre-requirement to install or upgrade Oracle Enterprise Monitor to version 13.5.