Oracle Database Migrate Using Mixed Oracle Version

We will discuss how to use mixed version of Data Guard to upgrade upper version with minimal downtime. DBA should not take 1% risk for most critical database in a company during migration or upgradation and must have to plan to rollback option for worse case.

Let say you are working in a big company and you need to upgrade a most critical database in company and you have only 6-10 hours down time to upgrade or migrate the database. You have to consider the rollback option on any state of migration processes for any kind of issues.

In this case, most appropriate way to upgrade or migrate using GoldenGate. But management may not agree to use GoldenGate because for budget shortage. So you have use this approach to minimized the downtime and risk.

  • Environment Details.
  • Upgrade Path for 12.2 Oracle database.
  • Mixed Versions Consideration.

Environment Details:

Source DatabaseTarget Database
Version11.2.0.412.2.0.1
Installed ASM Version11.2.0.412.2.0.1
Installed RDBMS Version11.2.0.412.2.0.1
NodeTwo Nodes RACTwo Nodes RAC
Serversrc_host1, src_host2target_host1, target_host2
Upgradation MethodDataGuardDataGuard

Upgrade Path for 12.2 Oracle database:

Minimum version of the database that can be directly upgraded to Oracle 12c Release 2 (12.2):

Intermediate upgrades needs to be carried for following releases:

Mixed Versions Consideration:

  • For Database up-gradation/migration – consider to restoration time for worse case.
  • If application is very critical and database size is huge.
  • If company can’t effort longer downtime but they are ok for 6-8 hours downtime.
  • If company don’t want to spend money for GoldenGate Licensing to upgrade or migrate. GoldenGate is best option for this kind of scenario.
  • As Original database will remain unchanged, So any time can roll back without restoration.

Mixed Version Support means Combinations of any Version, Major Release or Patchset.

Oracle Support following version to use mixed version of Data Guard. For Example:

  • 11.1.0.6 to 11.1.0.7 or higher
  • 11.1.0.7 to 11.2.0.1 or higher
  • 11.2.0.1 to 11.2.0.2 or higher

High Level Step to Upgrade Database Using Mixed Version of Data Guard:

Prerequisites:

  • Build New Server with your desire OS Version But OS should be same like Source DB server.
  • Install Oracle Binary on target Server. In this case, you have to install 12.1.0.2 and 12.2.0.1.
  • Primary Database Version will be 11.2.0.4.
  • Standby Data Guard Version will be 12.2.0.1.
  • Configure Data Guard and Start Replication.

Before Final Window Starting:

  • Take Full Backup (RMAN) before window will start

During Cut-Over/Final Window: Downtime is required (6-8 hrs downtime will be fine to complete the migration)

  • After stopping all applications on Primary Database, take incremental or archive log backup
  • Make sure that Primary and Standby database are Synced.

Run below command to disconnect the Data Guard connection with Standby database.

NOTE::: Primary Database will remain unchanged and if you are not satisfied with migration/up-gradate processes (if face any major issue which is required more time to fix) then start existing primary database and connect application).

Standby DB:
======================
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; 
Database altered. 

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH; 
Database altered. 

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; 
SWITCHOVER_STATUS 
-------------------
TO PRIMARY 

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN; Database altered. 

SQL> Select database_role,open_mode from v$database; 
DATABASE_ROLE OPEN_MODE 
---------------- -------------------
PRIMARY MOUNTED 

Database log mode Archive Mode 
Automatic archival Enabled 
Archive destination /backup/orcl/arch
Oldest online log sequence 1 
Next log sequence to archive 1 
Current log sequence 1 

SQL> SHUTDOWN IMMEDIATE;
ORA-01109: database not open
Database dismounted. 
ORACLE instance shut down. 

Note: without opening the db start the db in upgrade mode. 

SQL> startup upgrade; 
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance 
ORACLE instance started. 
...
Database mounted. 
Database opened. 

Now Start database up-gradation processes on 12.1 version

Leave a Reply