Loading....
This note describes the process of upgrading an Oracle 12c Release 2 Non-Container Database to Oracle 19c and also converting the Non-CDB database to a Pluggable Database (PDB).

The entire upgrade process is automated using the latest Oracle autoupgrade utility – autoupgrade.jar which is part of the new Oracle 12c database software release as well as it can be downloaded from MOS.

Source: ORCL (Oracle 12c Release 2)

Target: CDB1 (Oracle 19c)

############################################################################################################

Download the latest autoupgrade.jar file from MOS

############################################################################################################

AutoUpgrade Tool (Doc ID 2485457.1)


#############################################################################################################

Create the autoupgrade configuration file 

####################################################################################################

[oracle@HOL app]$ vi /home/oracle/config.txt

ORCL.source_home=/u01/app/oracle/product/12.2.0/dbhome_1

ORCL.target_home=/u01/app/oracle/product/19.0.0/dbhome_1

ORCL.sid=ORCL

ORCL.log_dir=/u01/app/oracle/upgrade-jobs

ORCL.restoration=yes

ORCL.target_cdb=cdb1

####################################################################################################

Execute autoupgrade in ANALYZE mode 

####################################################################################################

[oracle@HOL app]$ java -jar autoupgrade.jar -config /home/oracle/config.txt -mode analyze -console

No parameter 'global.autoupg_log_dir' found in config file, using /u01/app/oracle/cfgtoollogs/autoupgrade

AutoUpgrade tool launched with default options

Processing config file ...

+--------------------------------+

| Starting AutoUpgrade execution |

+--------------------------------+

1 databases will be analyzed

Type 'help' to list console commands

upg> lsj

+----+-------+---------+---------+-------+--------------+--------+----------------------------+

|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|

+----+-------+---------+---------+-------+--------------+--------+----------------------------+

| 100|   ORCL|PRECHECKS|PREPARING|RUNNING|20/12/21 08:34|08:34:07|Loading database information|

+----+-------+---------+---------+-------+--------------+--------+----------------------------+

Total jobs 1

upg> Job 100 completed

------------------- Final Summary --------------------

Number of databases            [ 1 ]

Jobs finished                  [1]

Jobs failed                    [0]

Jobs pending                   [0]

Please check the summary report at:

/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.html

/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log

####################################################################################################

Review the PRECHECKS report 

####################################################################################################

####################################################################################################

Execute autoupgrade in DEPLOY mode 

####################################################################################################

[oracle@HOL app]$ java -jar autoupgrade.jar -config /home/oracle/config.txt -mode deploy -console

No parameter 'global.autoupg_log_dir' found in config file, using /u01/app/oracle/cfgtoollogs/autoupgrade

AutoUpgrade tool launched with default options

Processing config file ...

+--------------------------------+

| Starting AutoUpgrade execution |

+--------------------------------+

1 databases will be processed

Type 'help' to list console commands

####################################################################################################

PRECHECKS and PREFIXUPS stage

####################################################################################################

upg> lsj

+----+-------+---------+---------+-------+--------------+--------+----------------------------+

|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                     MESSAGE|

+----+-------+---------+---------+-------+--------------+--------+----------------------------+

| 101|   ORCL|PRECHECKS|PREPARING|RUNNING|20/12/21 08:40|08:40:31|Loading database information|

+----+-------+---------+---------+-------+--------------+--------+----------------------------+

upg> /

+----+-------+---------+---------+-------+--------------+--------+---------------+

|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|        MESSAGE|

+----+-------+---------+---------+-------+--------------+--------+---------------+

| 101|   ORCL|PRECHECKS|PREPARING|RUNNING|20/12/21 08:40|08:45:04|Remaining 48/86|

+----+-------+---------+---------+-------+--------------+--------+---------------+

Total jobs 1

upg> /

+----+-------+---------+---------+-------+--------------+--------+-------------+

|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|      MESSAGE|

+----+-------+---------+---------+-------+--------------+--------+-------------+

| 101|   ORCL|PREFIXUPS|EXECUTING|RUNNING|20/12/21 08:40|08:45:18|Remaining 4/4|

+----+-------+---------+---------+-------+--------------+--------+-------------+

Total jobs 1

####################################################################################################

DBUPGRADE stage now commences

####################################################################################################

upg> /

+----+-------+---------+---------+-------+--------------+--------+------------+

|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|     MESSAGE|

+----+-------+---------+---------+-------+--------------+--------+------------+

| 101|   ORCL|DBUPGRADE|EXECUTING|RUNNING|20/12/21 08:40|09:25:17|10%Upgraded |

+----+-------+---------+---------+-------+--------------+--------+------------+

Total jobs 1

####################################################################################################

Review autoupgrade log files while DBUPGRADE stage is in progress 

####################################################################################################

[oracle@HOL ~]$ cd /u01/app/oracle/upgrade-jobs/

[oracle@HOL upgrade-jobs]$ ls

ORCL

[oracle@HOL upgrade-jobs]$ cd ORCL/

[oracle@HOL ORCL]$ ls -lrt

total 12

drwx------. 3 oracle oinstall 4096 Dec 21 08:34 100

drwx------. 7 oracle oinstall 4096 Dec 21 09:21 101

drwx------. 2 oracle oinstall 4096 Dec 21 09:25 temp

[oracle@HOL ORCL]$ cd 101

[oracle@HOL 101]$ ls -lrt

total 1072

drwx------. 2 oracle oinstall     28 Dec 21 08:40 preupgrade

-rwx------. 1 oracle oinstall  17220 Dec 21 09:00 autoupgrade_err.log

-rwx------. 1 oracle oinstall      0 Dec 21 09:20 autoupgrade_20201221.log.lck

-rwx------. 1 oracle oinstall      0 Dec 21 09:20 autoupgrade_err.log.lck

-rwx------. 1 oracle oinstall      0 Dec 21 09:20 autoupgrade_20201221_user.log.lck

drwx------. 2 oracle oinstall   4096 Dec 21 09:21 prechecks

drwx------. 2 oracle oinstall   4096 Dec 21 09:21 prefixups

drwx------. 2 oracle oinstall   4096 Dec 21 09:21 drain

-rwx------. 1 oracle oinstall  10876 Dec 21 09:25 autoupgrade_20201221_user.log

-rwx------. 1 oracle oinstall 803161 Dec 21 09:25 autoupgrade_20201221.log

drwx------. 2 oracle oinstall   4096 Dec 21 09:26 dbupgrade

[oracle@HOL 101]$ cd dbupgrade

[oracle@HOL dbupgrade]$ ls -lrt

total 14336

-rwx------. 1 oracle oinstall   30190 Dec 21 09:22 phase.log

-rwx------. 1 oracle oinstall     522 Dec 21 09:22 catupgrd20201221092024orcl_catcon_5174.lst

-rwx------. 1 oracle oinstall    3979 Dec 21 09:22 catupgrd20201221092024orcl_20201221092226_5174.ora

-rwx------. 1 oracle oinstall    3979 Dec 21 09:22 during_upgrade_pfile_catctl.ora

-rwx------. 1 oracle oinstall     656 Dec 21 09:26 catupgrd20201221092024orcl_catcon_kill_sess_5174_ALL.sql

-rwx------. 1 oracle oinstall    3650 Dec 21 09:26 autoupgrade20201221092024orcl.log

-rwx------. 1 oracle oinstall      63 Dec 21 09:26 catupgrd20201221092024orcl_catcon_6059.done

-rwx------. 1 oracle oinstall      63 Dec 21 09:26 catupgrd20201221092024orcl_catcon_6062.done

-rwx------. 1 oracle oinstall      63 Dec 21 09:26 catupgrd20201221092024orcl_catcon_6060.done

-rwx------. 1 oracle oinstall 1680178 Dec 21 09:26 catupgrd20201221092024orcl1.log

-rwx------. 1 oracle oinstall 1345637 Dec 21 09:26 catupgrd20201221092024orcl2.log

-rwx------. 1 oracle oinstall 1407850 Dec 21 09:26 catupgrd20201221092024orcl3.log

-rwx------. 1 oracle oinstall 8279906 Dec 21 09:26 catupgrd20201221092024orcl0.log

####################################################################################################

Check autoupgrade status

####################################################################################################

upg> status

---------------- Config -------------------

User configuration file    [/home/oracle/config.txt]

General logs location      [/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto]

Mode                       [DEPLOY]

DB upg fatal errors        ORA-00600,ORA-07445

DB Post upgrade abort time [60] minutes

DB upg abort time          [1440] minutes

DB restore abort time      [120] minutes

DB GRP abort time          [3] minutes

------------------------ Jobs ------------------------

Total databases in configuration file [1]

Total Non-CDB being processed         [1]

Total CDB being processed             [0]

Jobs finished successfully            [0]

Jobs finished/aborted                 [0]

Jobs in progress                      [1]

Jobs stage summary

Job ID: 101

DB name: ORCL

SETUP             <1 min

GRP               <1 min

PREUPGRADE        <1 min

PRECHECKS         <1 min

PREFIXUPS         <1 min

DRAIN             <1 min

DBUPGRADE         23 min (IN PROGRESS)

------------ Resources ----------------

Threads in use                        [19]

JVM used memory                       [37] MB

CPU in use                            [13%]

Processes in use                      [18]

upg> /

+----+-------+---------+---------+-------+--------------+--------+------------+

|Job#|DB_NAME|    STAGE|OPERATION| STATUS|    START_TIME| UPDATED|     MESSAGE|

+----+-------+---------+---------+-------+--------------+--------+------------+

| 101|   ORCL|DBUPGRADE|EXECUTING|RUNNING|20/12/21 08:40|09:43:29|58%Upgraded |

+----+-------+---------+---------+-------+--------------+--------+------------+

Total jobs 1

####################################################################################################

Autoupgrade also applying database patches

####################################################################################################

[oracle@HOL dbupgrade]$ ls -lrt

total 59524

-rwx------. 1 oracle oinstall    30190 Dec 21 09:22 phase.log

-rwx------. 1 oracle oinstall      522 Dec 21 09:22 catupgrd20201221092024orcl_catcon_5174.lst

-rwx------. 1 oracle oinstall     3979 Dec 21 09:22 catupgrd20201221092024orcl_20201221092226_5174.ora

-rwx------. 1 oracle oinstall     3979 Dec 21 09:22 during_upgrade_pfile_catctl.ora

-rwx------. 1 oracle oinstall      656 Dec 21 09:55 catupgrd20201221092024orcl_catcon_kill_sess_5174_ALL.sql

-rwx------. 1 oracle oinstall       63 Dec 21 09:55 catupgrd20201221092024orcl_catcon_10248.done

-rwx------. 1 oracle oinstall       63 Dec 21 09:55 catupgrd20201221092024orcl_catcon_10249.done

-rwx------. 1 oracle oinstall       63 Dec 21 09:55 catupgrd20201221092024orcl_catcon_10251.done

-rwx------. 1 oracle oinstall     7809 Dec 21 09:55 autoupgrade20201221092024orcl.log

-rwx------. 1 oracle oinstall  5509605 Dec 21 09:55 catupgrd20201221092024orcl2.log

-rwx------. 1 oracle oinstall  5413848 Dec 21 09:55 catupgrd20201221092024orcl3.log

-rwx------. 1 oracle oinstall  6809826 Dec 21 09:55 catupgrd20201221092024orcl1.log

-rwx------. 1 oracle oinstall       63 Dec 21 09:55 catupgrd20201221092024orcl_catcon_10247.done

-rwx------. 1 oracle oinstall 43120113 Dec 21 09:55 catupgrd20201221092024orcl0.log

-rwx------. 1 oracle oinstall        0 Dec 21 09:56 catupgrd20201221092024orcl_datapatch_upgrade.err

-rwx------. 1 oracle oinstall     1191 Dec 21 09:56 catupgrd20201221092024orcl_datapatch_upgrade.log

[oracle@HOL dbupgrade]$ tail -f catupgrd20201221092024orcl_datapatch_upgrade.log

Adding patches to installation queue and performing prereq checks...done

Installation queue:

No interim patches need to be rolled back

Patch 31281355 (Database Release Update : 19.8.0.0.200714 (31281355)):

Apply from 19.1.0.0.0 Feature Release to 19.8.0.0.0 Release_Update 200703031501

The following interim patches will be applied:

31219897 (OJVM RELEASE UPDATE: 19.8.0.0.200714 (31219897))

Installing patches...

####################################################################################################

Database is being restarted after upgrade has completed

####################################################################################################

upg> /

+----+-------+---------+---------+--------+--------------+--------+-------------------+

|Job#|DB_NAME|    STAGE|OPERATION|  STATUS|    START_TIME| UPDATED|            MESSAGE|

+----+-------+---------+---------+--------+--------------+--------+-------------------+

| 101|   ORCL|DBUPGRADE|EXECUTING|FINISHED|20/12/21 08:40|10:03:08|Restarting Database|

+----+-------+---------+---------+--------+--------------+--------+-------------------+

Total jobs 1

####################################################################################################

Review Post-Upgrade status log file 

####################################################################################################

Oracle Database Release 19 Post-Upgrade Status Tool    12-21-2020 10:01:3

Database Name: ORCL

Component                               Current         Full     Elapsed Time

Name                                    Status          Version  HH:MM:SS

Oracle Server                          UPGRADED      19.8.0.0.0  00:20:43

JServer JAVA Virtual Machine              VALID      19.8.0.0.0  00:01:55

Oracle XDK                             UPGRADED      19.8.0.0.0  00:01:36

Oracle Database Java Packages          UPGRADED      19.8.0.0.0  00:00:21

OLAP Analytic Workspace                UPGRADED      19.8.0.0.0  00:00:32

Oracle Label Security                  UPGRADED      19.8.0.0.0  00:00:19

Oracle Database Vault                  UPGRADED      19.8.0.0.0  00:01:01

Oracle Text                            UPGRADED      19.8.0.0.0  00:01:19

Oracle Workspace Manager               UPGRADED      19.8.0.0.0  00:01:11

Oracle Real Application Clusters       UPGRADED      19.8.0.0.0  00:00:01

Oracle XML Database                    UPGRADED      19.8.0.0.0  00:02:38

Oracle Multimedia                      UPGRADED      19.8.0.0.0  00:00:56

Oracle OLAP API                           VALID      19.8.0.0.0  00:00:20

Datapatch                                                        00:04:05

Final Actions                                                    00:04:13

Post Upgrade                                                     00:00:16

Total Upgrade Time: 00:37:57

Database time zone version is 26. It is older than current release time

zone version 32. Time zone upgrade is needed using the DBMS_DST package.

Grand Total Upgrade Time:    [0d:0h:41m:21s]

upg> lsj

####################################################################################################

Upgraded Non-CDB database is now being converted to a PDB

####################################################################################################

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

|Job#|DB_NAME|      STAGE|OPERATION| STATUS|    START_TIME| UPDATED|            MESSAGE|

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

| 101|   ORCL|NONCDBTOPDB|EXECUTING|RUNNING|20/12/21 08:40|12:39:22|Compatibility check|

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

Total jobs 1

[oracle@HOL 101]$ ls -lrt

total 1192

drwx------. 2 oracle oinstall      28 Dec 21 08:40 preupgrade

drwx------. 2 oracle oinstall    4096 Dec 21 09:21 prechecks

drwx------. 2 oracle oinstall    4096 Dec 21 09:21 prefixups

drwx------. 2 oracle oinstall    4096 Dec 21 10:04 postchecks

drwx------. 2 oracle oinstall      82 Dec 21 10:04 postfixups

drwx------. 2 oracle oinstall      29 Dec 21 10:04 postupgrade

drwx------. 2 oracle oinstall    4096 Dec 21 11:00 dbupgrade

drwx------. 2 oracle oinstall    4096 Dec 21 11:00 drain

drwx------. 2 oracle oinstall      94 Dec 21 12:41 noncdbtopdb

-rwx------. 1 oracle oinstall   43238 Dec 21 12:41 autoupgrade_err.log

-rwx------. 1 oracle oinstall   17420 Dec 21 12:41 autoupgrade_20201221_user.log

-rwx------. 1 oracle oinstall 1130634 Dec 21 12:41 autoupgrade_20201221.log

[oracle@HOL 101]$ cd noncdbtopdb/

[oracle@HOL noncdbtopdb]$ ls -lrt

total 72

-rwx------. 1 oracle oinstall     0 Dec 21 12:40 lsj

-rwx------. 1 oracle oinstall  7060 Dec 21 12:41 ORCL.xml

-rw-r--r--. 1 oracle oinstall  1293 Dec 21 12:41 createpdb_orcl_ORCL.log

-rwx------. 1 oracle oinstall 61303 Dec 21 12:41 noncdb_to_pdb_orcl.log

upg> lsj

+----+-------+-----------+---------+-------+--------------+--------+---------------------------+

|Job#|DB_NAME|      STAGE|OPERATION| STATUS|    START_TIME| UPDATED|                    MESSAGE|

+----+-------+-----------+---------+-------+--------------+--------+---------------------------+

| 101|   ORCL|NONCDBTOPDB|EXECUTING|RUNNING|20/12/21 08:40|12:47:26|Creating pluggable database|

+----+-------+-----------+---------+-------+--------------+--------+---------------------------+

Total jobs 1

upg> /

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

|Job#|DB_NAME|      STAGE|OPERATION| STATUS|    START_TIME| UPDATED|            MESSAGE|

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

| 101|   ORCL|NONCDBTOPDB|EXECUTING|RUNNING|20/12/21 08:40|12:47:59|noncdb_to_pdb - 28%|

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

Total jobs 1

upg> /

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

|Job#|DB_NAME|      STAGE|OPERATION| STATUS|    START_TIME| UPDATED|            MESSAGE|

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

| 101|   ORCL|NONCDBTOPDB|EXECUTING|RUNNING|20/12/21 08:40|12:52:30|noncdb_to_pdb - 64%|

+----+-------+-----------+---------+-------+--------------+--------+-------------------+

Total jobs 1

####################################################################################################

Non-CDB conversion to PDB is now completed 

####################################################################################################

upg> Job 101 completed

------------------- Final Summary --------------------

Number of databases            [ 1 ]

Jobs finished                  [1]

Jobs failed                    [0]

Jobs pending                   [0]

Please check the summary report at:

/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.html

/u01/app/oracle/cfgtoollogs/autoupgrade/cfgtoollogs/upgrade/auto/status/status.log

####################################################################################################

ORCL database is now an Oracle 19c PDB

####################################################################################################

[oracle@HOL app]$ sqlplus sys as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Mon Dec 21 13:15:07 2020

Version 19.8.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Enter password:

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.8.0.0.0

SQL> show pdbs

CON_ID CON_NAME			  OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

2 PDB$SEED			  READ ONLY  NO

3 PDB1 			          READ WRITE NO

5 ORCL 			          READ WRITE NO
Please follow and like us:

Last Update: December 22, 2020  

December 22, 2020 1408 Gavin Soorma
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?

, , , , ,

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*

Social media & sharing icons powered by UltimatelySocial
Back To Top

Add A Knowledge Base Question !

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?