Upgrade Oracle Database from 12.1.0.2 to 12.2.0.1 using DBUA

This article explains how to upgrade Oracle database from the version 12cR1 (12.1.0.2) to the version 12cR2 (12.2.0.1) using the the tool Database Upgrade Assistant DBUA.

Table of Contents:

  1. Check The existing version.
  2. Sauvegarde before upgrade in case of upgrade failure.
  3. Upgrade with DBUA.
  4. Verification of the new version.

1. Check The existing version:

a. Verify the existing database in the file /etc/oratab:

$ cat /etc/oratab
...
wadhah:/home/oracle/app/oracle/product/12.1.0/dbhome_1:N

 

b. Check the version:

$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue May 29 08:37:59 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select * from v$version;
BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production 0
PL/SQL Release 12.1.0.2.0 - Production 0
CORE 12.1.0.2.0 Production 0
TNS for Linux: Version 12.1.0.2.0 - Production 0
NLSRTL Version 12.1.0.2.0 - Production 0

 

c. Name of the database:

SQL> select name from v$database;
NAME
---------
WADHAH

 

2. Sauvegarde before upgrade in case of upgrade failure:

Make sure to take a full backup before you begin the upgrade steps, in case of upgrade failure.

a. Backup Full offline:

$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Tue May 29 08:52:00 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: WADHAH (DBID=152152954, not open)
RMAN> backup database;
Starting backup at 29-MAY-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/home/oracle/app/oracle/oradata/WADHAH/datafile/o1_mf_example_fjsdj7rq_.dbf
input datafile file number=00001 name=/home/oracle/app/oracle/oradata/WADHAH/datafile/o1_mf_system_fjsd8gwo_.dbf
input datafile file number=00003 name=/home/oracle/app/oracle/oradata/WADHAH/datafile/o1_mf_sysaux_fjsd3wrb_.dbf
input datafile file number=00004 name=/home/oracle/app/oracle/oradata/WADHAH/datafile/o1_mf_undotbs1_fjsdg2w5_.dbf
input datafile file number=00006 name=/home/oracle/app/oracle/oradata/WADHAH/datafile/o1_mf_users_fjsdfz2d_.dbf
channel ORA_DISK_1: starting piece 1 at 29-MAY-18
channel ORA_DISK_1: finished piece 1 at 29-MAY-18
piece handle=/home/oracle/app/oracle/fast_recovery_area/WADHAH/backupset/2018_05_29/o1_mf_nnndf_TAG20180529T085209_fjt1objs_.bkp tag=TAG20180529T085209 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 29-MAY-18
channel ORA_DISK_1: finished piece 1 at 29-MAY-18
piece handle=/home/oracle/app/oracle/fast_recovery_area/WADHAH/backupset/2018_05_29/o1_mf_ncsnf_TAG20180529T085209_fjt1ov38_.bkp tag=TAG20180529T085209 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 29-MAY-18
RMAN>

 

3. Upgrade with DBUA:

After installing the software only of the Oracle database 12.2.0.1, we are going to begin the upgrade steps: Database in the OPEN mode.

a. Step 1: run the DBUA and set the credentials information:

b. Step 2: Pre-Upgrade Checks:

c. Step 3: List of recommandations:

d. Step 4: Upgrade options:

e. Step 5: Take a full backup to recover the database in case of upgrade failure.

f. Step 6: Select the listener:

g. Step 7: Configure the Entreprise Manager (EM).

h. Step 8: Database upgrade summary:

i. Step 9: Oracle database upgrade in progress:

Can take some hours, depends of :

  • The size of the Oracle database
  • Performance CPU.

j. Step 10: The upgrade process has finished after 3hours.

k. Step 11: The upgrade process summary:

4. Verification of the new version:

After the upgrade process finiched, we are going to check the new version:

 

Conslusion:

The upgrade steps of the Oracle database version 12cR1 (12.1.0.2) to the version 12cR2 (12.2.0.1) using the the DBUA.

Bookmark the permalink.
Loading Facebook Comments ...

Leave a Reply

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