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.
|Source Database||Target Database|
|Installed ASM Version||22.214.171.124||126.96.36.199|
|Installed RDBMS Version||188.8.131.52||184.108.40.206|
|Node||Two Nodes RAC||Two Nodes RAC|
|Server||src_host1, src_host2||target_host1, target_host2|
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:
- 220.127.116.11 to 18.104.22.168 or higher
- 22.214.171.124 to 126.96.36.199 or higher
- 188.8.131.52 to 184.108.40.206 or higher
High Level Step to Upgrade Database Using Mixed Version of Data Guard:
- 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 220.127.116.11 and 18.104.22.168.
- Primary Database Version will be 22.214.171.124.
- Standby Data Guard Version will be 126.96.36.199.
- 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