Upgrade Oracle database from 12c (12.1.0.2) to 19c (19.3.0.0) using the RMAN backup

This article explains the steps to upgrade Oracle database 12cr1 (12.1.0.2) to the 19c version (19.3.0.0.0) using the RMAN backup.

Steps of Oracle Database 19c Restore from 12c rman backup:

Step 1: Create a pfile from spfile 12cr1:

SQL> create pfile from spfile;

Step 2: Change the parameter compatible in the pfile:

From :

*.compatible='12.1.0.2.0'

To :

*.compatible='19.3.0.0.0'

Step 3: Move the full backup of control file and data files of the Oracle 12.1.0.2:

Step 4: Restore conrolfile on the 19c

$ ../bin/rman target / 
Recovery Manager: Release 19.0.0.0.0 - Production on Tue Aug 27 18:11:27 2019
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to target database: WADHAH (not mounted)

RMAN> restore controlfile from '/u01/app/oracle/fast_recovery_area/WADHAH/backupset/2019_08_27/o1_mf_ncsnf_TAG20190827T113154_gpb1p96w_.bkp';
Starting restore at 27-AUG-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/wadhah/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/wadhah/control02.ctl
Finished restore at 27-AUG-19

Step 5 : Restore database:

RMAN> alter database mount;
released channel: ORA_DISK_1
Statement processed
RMAN>
RMAN> catalog backuppiece '/u01/app/oracle/fast_recovery_area/WADHAH/backupset/2019_08_27/o1_mf_nnndf_TAG20190827T113154_gpb1nv2s_.bkp';
RMAN> restore database;
Starting restore at 27-AUG-19
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/wadhah/system01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/wadhah/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/wadhah/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/wadhah/example01.dbf
channel ORA_DISK_1: restoring datafile 00006 to /u01/app/oracle/oradata/wadhah/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/WADHAH/backupset/2019_08_27/o1_mf_nnndf_TAG20190827T113154_gpb1nv2s_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/WADHAH/backupset/2019_08_27/o1_mf_nnndf_TAG20190827T113154_gpb1nv2s_.bkp tag=TAG20190827T113154
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:15
Finished restore at 27-AUG-19
RMAN>

Step 6: Open the database:

RMAN> alter database open resetlogs; 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03004: fatal error during execution of command
ORA-01092: ORACLE instance terminated. Disconnection forced
RMAN-03002: failure of sql statement command at 08/27/2019 18:17:09
ORA-00603: ORACLE server session terminated by fatal error
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-00604: error occurred at recursive SQL level 1
ORA-00904: "SPARE10": invalid identifier
Process ID: 5946
Session ID: 237 Serial number: 25165
Oracle error from target database:
ORA-03114: not connected to ORACLE

Step 7: Upgrade the database:

SQL> startup upgrade;
$ $ORACLE_HOME/perl/bin/perl catctl.pl -n 4 catupgrd.sql
Argument list for [catctl.pl]
For Oracle internal use only A = 0
Run in c = 0
Do not run in C = 0
Input Directory d = 0
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = 0
Child Process I = 0
Log Dir l = 0
Priority List Name L = 0
Upgrade Mode active M = 0
SQL Process Count n = 4
SQL PDB Process Count N = 0
Open Mode Normal o = 0
Start Phase p = 0
End Phase P = 0
Reverse Order r = 0
AutoUpgrade Resume R = 0
Script s = 0
Serial Run S = 0
RO User Tablespaces T = 0
Display Phases y = 0
Debug catcon.pm z = 0
Debug catctl.pl Z = 0
catctl.pl VERSION: [19.0.0.0.0]
STATUS: [Production]
BUILD: [RDBMS_19.3.0.0.0DBRU_LINUX.X64_190417]
.....

Number of Cpus = 2
Database Name = wadhah
DataBase Version = 12.1.0.2.0
...

Parallel SQL Process Count = 4
Components in [wadhah]
Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ]
Not Installed [EM MGW ODM RAC WK]
...

Grand Total Upgrade Time: [0d:0h:39m:14s]

Step 8: Check the Database registries:

COMP_NAME                 VERSION            STATUS
Oracle Database Catalog Views 19.0.0.0.0 UPGRADED
Oracle Database Packages and Types 19.0.0.0.0 UPGRADED
JServer JAVA Virtual Machine 19.0.0.0.0 UPGRADED
Oracle XDK 19.0.0.0.0 UPGRADED
Oracle Database Java Packages 19.0.0.0.0 UPGRADED
OLAP Analytic Workspace 19.0.0.0.0 UPGRADED
Oracle Real Application Clusters 19.0.0.0.0 UPGRADED
Oracle XML Database 19.0.0.0.0 UPGRADED
Oracle Workspace Manager 19.0.0.0.0 UPGRADED
Oracle Text 19.0.0.0.0 UPGRADED
Oracle Multimedia 19.0.0.0.0 UPGRADED
Spatial 19.0.0.0.0 UPGRADED
Oracle OLAP API 19.0.0.0.0 UPGRADED
Oracle Label Security 19.0.0.0.0 UPGRADED
Oracle Application Express 4.2.5.00.08 VALID
Oracle Database Vault 19.0.0.0.0 UPGRADED
16 rows selected.

Conclusion:

Upgrading Oracle database 12cr1 to 19c using RMAN, it is the same steps upgrading 11.2.0.4 to 12.1.0.2.

Is is the same steps like 11gr2 to 12cr1:

Bookmark the permalink.
Loading Facebook Comments ...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.