Upgrade To Oracle 19c Using Newly Introduced AutoUpgrade.jar


Upgrade to Oracle Database 19c from 12c using autoupgrade.jar

In this demonstration, I have upgraded Oracle Database from 12.2.0.1 to 19.0.0.0 which is running on Oracle Linux 7.5

There were two methods till 18c for upgrade,

1. DBUA
2. Manual – Using preupgrade.jar 

However, in Oracle Database 19c there’s new method of upgrading the database is introduced. That is using Auto Upgrade utility. Database can directly be upgraded to 19c from below releases.
11.2.0.3, 11.2.0.4, 12.1.0.1, 12.1.0.2, 12.2.0.1 and 18


I assume that you already have installed Oracle Database 19c binaries, if you haven’t you may want to see this article on Installation of Oracle Database 19c on Oracle Linux 7.

1. Take full backup of your database with controlfile and spfile. So that if anything goes wrong during upgrade, you can always restore your database.

run {
allocate channel demtest_backup_disk1 type disk format '/u02/app/oracle/oradata/DEMTEST/full_backup/%d_%U';
allocate channel demtest_backup_disk2 type disk format '/u02/app/oracle/oradata/DEMTEST/full_backup/%d_%U';
allocate channel demtest_backup_disk3 type disk format '/u02/app/oracle/oradata/DEMTEST/full_backup/%d_%U';
allocate channel demtest_backup_disk4 type disk format '/u02/app/oracle/oradata/DEMTEST/full_backup/%d_%U';
backup incremental level 0 database;
backup current controlfile;
release channel demtest_backup_disk1;
release channel demtest_backup_disk2;
release channel demtest_backup_disk3;
release channel demtest_backup_disk4;
}

Make sure the backup is completed by querying v$backup view.

SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';
no rows selected

2. Pre-Upgrade actions.

  • Recompile invalid objects.

Check invalid objects from DBA_OBJECTS using below query.

SQL> SELECT count(*) FROM DBA_OBJECTS WHERE STATUS='INVALID';

COUNT(*)
----------
125

Recompile invalids using utlrp.sql

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

Again verify invalids from DBA_OBJECTS.

SQL> SELECT count(*) FROM DBA_OBJECTS WHERE STATUS='INVALID';

COUNT(*)
----------
0

As you can see all invalid objects recompiled successfully.

  • Gather Dictionary Statistics.
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

PL/SQL procedure successfully completed.
  • Purge DBA Recyclebin.

Check if DBA_RECYCLEBIN has any objects in it.

SQL> SELECT COUNT(*) FROM DBA_RECYCLEBIN;

COUNT(*)
----------
13

Purge DBA_RECYCLEBIN using below query.

SQL> PURGE DBA_RECYCLEBIN;

DBA Recyclebin purged.

Necessary pre upgrade actions are been taken care of, now we can proceed further.


3. Create sample Auto-Upgrade config file.

First of all, let us make one directory called upgrade_to_19c which will hold all the config files, log files during this upgrade.

[[email protected] ~]$ mkdir upgrade_to_19c

Redirect to upgrade_to_19c directory.

[[email protected] ~]$ cd upgrade_to_19c/

Run autoupgrade.jar to create sample file in current directory.

[[email protected] upgrade_to_19c]$ java -jar /u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/autoupgrade.jar -create_sample_file config
Created sample configuration file /home/oracle/upgrade_to_19c/sample_config.cfg

Copy config file to DEMTEST_config.cfg and edit it to make necessary changes.

Delete unwanted lines from DEMTEST_config.cfg file and make necessary changes as below.

global.autoupg_log_dir=/home/oracle/upgrade_to_19c/global_logs
upg1.dbname=DEMTEST
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/12.2.0/dbhome_1
upg1.target_home=/u03/app/oracle/product/19.0.0/dbhome_1
upg1.sid=DEMTEST
upg1.log_dir=/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs
upg1.upgrade_node=bcp.demunix.com
upg1.target_version=19.1
upg1.run_utlrp=yes
upg1.timezone_upg=yes

Create global_logs and DEMTEST_upgrade_logs directories as mentioned in above config file to hold log files during upgrade.

Note that you can upgrade multiple databases using autoupgrade.jar by naming up1, upg2, …upgn in config file as you can see in below sample_config.cfg file there are 2 databases upg1 and upg2. You can define as many databases as you desire to upgrade.

[[email protected] upgrade_to_19c]$ cat sample_config.cfg 
# $Header: rdbms/src/server/upgrade/autoupgrade/src/main/resources/autoupgrade/templates/sample_config_unix.properties /st_rdbms_pt-autoupgrade/7 2018/07/11 09:38:27 frealvar Exp $
#
# Copyright (c) 2017, 2018, Oracle and/or its affiliates. 
# All rights reserved.*/
#
#
# DESCRIPTION
# This is a template for config file to be used with autoupgrade tool.
#
# NOTES
# <other useful comments, qualifications, etc.>
#
# MODIFIED (MM/DD/YY)
# frealvar 07/10/18 - code refactor due to AUPG-250
# frealvar 04/30/18 - AUPG-189 optionally run utlrp and timezone upgrades
# fvallin 04/06/17 - Creation
#
#

#Global configurations
#Autoupgrade's global directory, non-job logs generated,
#temp files created and other autoupgrade files will be
#send here
global.autoupg_log_dir=/default/current/location


#
# sample config file
#

#
# Database number 1 
#
upg1.dbname=employee
upg1.start_time=NOW
upg1.source_home=/u01/app/oracle/product/11.2.0/dbhome_1
upg1.target_home=/u01/app/oracle/product/19.1.0/dbhome_1
upg1.sid=emp
upg1.log_dir=/scratch/auto
upg1.upgrade_node=node1
upg1.target_version=19.1
#upg1.run_utlrp=yes
#upg1.timezone_upg=yes

#
# Database number 2
#
#upg2.dbname=database name
#upg2.start_time=dd/mm/yyyy hh:mm:ss | now
#upg2.source_home=Path to source version of Oracle database
#upg2.target_home=Path to target version of Oracle database
#upg2.sid=Value of Oracle SID
#upg2.log_dir=Path to log dir
#upg2.upgrade_node=Node name
#upg2.target_version= 12.2.0.1
#upg2.run_utlrp=[yes|no]
#upg2.timezone_upg=[yes|no]

#
# You can have as many databases as desired
#
#upgN.dbname=database name
#upgN.start_time=dd/mm/yyyy hh:mm:ss/now
#upgN.source_home=Path to source version of Oracle database
#upgN.target_home=Path to target version of Oracle database
#upgN.sid=Value of Oracle SID
#upgN.log_dir=Path to log dir
#upgN.upgrade_node= Node name
#upgN.target_version= 18.1
#upgN.run_utlrp=[yes|no]
#upgN.timezone_upg=[yes|no]

4. The Four Modes of AutoUpgrade processing described in Oracle Docs (ANALYZE, FIXUP, DEPLOY & UPGRADE).

  • ANALYZE : This mode perform pre-checks on source database to see if it is ready for upgrade. It will only ANALYZE the source database and will to perform any changes.
  • FIXUPS : This mode performs the pre-checks on source database, also it will attempt to fix up the items that must be corrected before it can be upgraded.
  • DEPLOY : This mode will perform actual upgrade of the source database. If needed it can also perform fixups on database.
  • UPGRADE : Upgrade mode enables you to upgrade the target Oracle Home in cases where you do not have access to source Oracle Home.

You can run auto upgrade directly in DEPLOY mode without running ANALYZE and FIXUPS mode. But if you do not want to take chances to see unforseen abortion of upgrade, you better run it in ANALYZE and FIXUPS mode before running it in DEPLOY mode.


5. Running AutoUpgrade.jar

  • ANALYZE mode.
[[email protected] upgrade_to_19c]$ java -jar /u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/autoupgrade.jar -config DEMTEST_config.cfg -mode ANALYZE
Autoupgrade tool launched with default options
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be analyzed
Enter some command, type 'help' or 'exit' to quit
upg>

Run console commands to get some more details.

upg> status
---------------- Config -------------------
User configuration file [/home/oracle/upgrade_to_19c/DEMTEST_config.cfg]
General logs location [/home/oracle/upgrade_to_19c/global_logs/cfgtoollogs/upgrade/auto]
Mode [ANALYZE]
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 drop 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]
------------ Resources ----------------
Threads in use [19]
JVM used memory [33] MB
CPU in use [13%]
Processes in use [18]

List Running jobs.

+----+-------+---------+---------+-------+--------------+--------+--------+--------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+--------------+
| 100|DEMTEST|PRECHECKS|PREPARING|RUNNING|19/10/10 17:12| N/A|17:13:07|Remaining 4/72|
+----+-------+---------+---------+-------+--------------+--------+--------+--------------+
Total jobs 1
upg>

Once all the jobs finishes, you will get below message.

upg> 
Job 100 for DEMTEST FINISHED

Once the AutoUpgrade finished in ANALYZE mode, you can view an HTML output of script under specified upg1.log_dir which is /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs in our case. Location of HTML output file is 100/prechecks/ under above specified directory. Name would be <dbname>_preupgrade.html which is demtest_preupgrade.html in our case. You can also verify the precheck status by looking at specified global.autoupg_log_dir which is /home/oracle/upgrade_to_19c/global_logs in our case. Under this directory, navigate to cfgtoollogs/upgrade/auto/status under global.autoupg_log if you see <dbname>_prechecks.success, you’re good to proceed with DEPLOY mode.

(I’ll cover log structure of autoupgrade in detail in other post)


  • Let’s run in DEPLOY mode as pre-checks were succeeded.
[[email protected] upgrade_to_19c]$ java -jar /u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/autoupgrade.jar -config DEMTEST_config.cfg -mode DEPLOY
Autoupgrade tool launched with default options
+--------------------------------+
| Starting AutoUpgrade execution |
+--------------------------------+
1 databases will be processed
Enter some command, type 'help' or 'exit' to quit
upg>

As soon as you run it in DEPLOY mode, consider doing tail -f on upg1.log_dir/<Job#>/dbupgrade/autoupgrade<timestamp><dbname>.log file to see progress of upgrade.

The complete autoupgrade log is below,

[[email protected] ~]$ head upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/autoupgrade20191010180322demtest.log

Argument list for [/u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 1
Run in c = 0
Do not run in C = 0
Input Directory d = /u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = 20191010180322demtest
[[email protected] ~]$ head 30 upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/autoupgrade20191010180322demtest.log
head: cannot open ‘30’ for reading: No such file or directory
==> upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/autoupgrade20191010180322demtest.log <==

Argument list for [/u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 1
Run in c = 0
Do not run in C = 0
Input Directory d = /u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = 20191010180322demtest
[[email protected] ~]$ cat upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/autoupgrade20191010180322demtest.log

Argument list for [/u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 1
Run in c = 0
Do not run in C = 0
Input Directory d = /u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = 20191010180322demtest
Child Process I = 0
Log Dir l = /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade
Priority List Name L = 0
Upgrade Mode active M = 0
SQL Process Count n = 0
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]


/u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/orahome = [/u03/app/oracle/product/19.0.0/dbhome_1]
/u03/app/oracle/product/19.0.0/dbhome_1/bin/orabasehome = [/u03/app/oracle/product/19.0.0/dbhome_1]
catctlGetOraBaseLogDir = [/u03/app/oracle/product/19.0.0/dbhome_1]

Analyzing file /u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catupgrd.sql

Log file directory = [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/catupgrd20191010180322demtest_catcon_14236.lst]

catcon::set_log_file_base_path: catcon: See [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/catupgrd20191010180322demtest*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/catupgrd20191010180322demtest_*.lst] files for spool files, if any


Number of Cpus = 4
Database Name = DEMTEST
DataBase Version = 12.2.0.1.0
Parallel SQL Process Count = 4
Components in [DEMTEST]
Installed [CATALOG CATPROC XDB]
Not Installed [APEX APS CATJAVA CONTEXT DV EM JAVAVM MGW ODM OLS ORDIM OWM RAC SDO WK XML XOQ]

------------------------------------------------------
Phases [0-107] Start Time:[2019_10_10 18:05:57]
------------------------------------------------------
*********** Executing Change Scripts ***********
Serial Phase #:0 [DEMTEST] Files:1 Time: 57s
*************** Catalog Core SQL ***************
Serial Phase #:1 [DEMTEST] Files:5 Time: 59s
Restart Phase #:2 [DEMTEST] Files:1 Time: 3s
*********** Catalog Tables and Views ***********
Parallel Phase #:3 [DEMTEST] Files:19 Time: 28s
Restart Phase #:4 [DEMTEST] Files:1 Time: 2s
************* Catalog Final Scripts ************
Serial Phase #:5 [DEMTEST] Files:7 Time: 23s
***************** Catproc Start ****************
Serial Phase #:6 [DEMTEST] Files:1 Time: 20s
***************** Catproc Types ****************
Serial Phase #:7 [DEMTEST] Files:2 Time: 20s
Restart Phase #:8 [DEMTEST] Files:1 Time: 3s
**************** Catproc Tables ****************
Parallel Phase #:9 [DEMTEST] Files:67 Time: 48s
Restart Phase #:10 [DEMTEST] Files:1 Time: 1s
************* Catproc Package Specs ************
Serial Phase #:11 [DEMTEST] Files:1 Time: 122s
Restart Phase #:12 [DEMTEST] Files:1 Time: 3s
************** Catproc Procedures **************
Parallel Phase #:13 [DEMTEST] Files:94 Time: 18s
Restart Phase #:14 [DEMTEST] Files:1 Time: 2s
Parallel Phase #:15 [DEMTEST] Files:120 Time: 34s
Restart Phase #:16 [DEMTEST] Files:1 Time: 3s
Serial Phase #:17 [DEMTEST] Files:22 Time: 6s
Restart Phase #:18 [DEMTEST] Files:1 Time: 4s
***************** Catproc Views ****************
Parallel Phase #:19 [DEMTEST] Files:32 Time: 35s
Restart Phase #:20 [DEMTEST] Files:1 Time: 3s
Serial Phase #:21 [DEMTEST] Files:3 Time: 21s
Restart Phase #:22 [DEMTEST] Files:1 Time: 3s
Parallel Phase #:23 [DEMTEST] Files:25 Time: 280s
Restart Phase #:24 [DEMTEST] Files:1 Time: 3s
Parallel Phase #:25 [DEMTEST] Files:12 Time: 183s
Restart Phase #:26 [DEMTEST] Files:1 Time: 1s
Serial Phase #:27 [DEMTEST] Files:1 Time: 0s
Serial Phase #:28 [DEMTEST] Files:3 Time: 9s
Serial Phase #:29 [DEMTEST] Files:1 Time: 0s
Restart Phase #:30 [DEMTEST] Files:1 Time: 3s
*************** Catproc CDB Views **************
Serial Phase #:31 [DEMTEST] Files:1 Time: 2s
Restart Phase #:32 [DEMTEST] Files:1 Time: 3s
Serial Phase #:34 [DEMTEST] Files:1 Time: 0s
***************** Catproc PLBs *****************
Serial Phase #:35 [DEMTEST] Files:293 Time: 55s
Serial Phase #:36 [DEMTEST] Files:1 Time: 0s
Restart Phase #:37 [DEMTEST] Files:1 Time: 3s
Serial Phase #:38 [DEMTEST] Files:6 Time: 11s
Restart Phase #:39 [DEMTEST] Files:1 Time: 2s
*************** Catproc DataPump ***************
Serial Phase #:40 [DEMTEST] Files:3 Time: 103s
Restart Phase #:41 [DEMTEST] Files:1 Time: 2s
****************** Catproc SQL *****************
Parallel Phase #:42 [DEMTEST] Files:13 Time: 181s
Restart Phase #:43 [DEMTEST] Files:1 Time: 3s
Parallel Phase #:44 [DEMTEST] Files:11 Time: 24s
Restart Phase #:45 [DEMTEST] Files:1 Time: 3s
Parallel Phase #:46 [DEMTEST] Files:3 Time: 4s
Restart Phase #:47 [DEMTEST] Files:1 Time: 3s
************* Final Catproc scripts ************
Serial Phase #:48 [DEMTEST] Files:1 Time: 11s
Restart Phase #:49 [DEMTEST] Files:1 Time: 3s
************** Final RDBMS scripts *************
Serial Phase #:50 [DEMTEST] Files:1 Time: 9s
************ Upgrade Component Start ***********
Serial Phase #:51 [DEMTEST] Files:1 Time: 3s
Restart Phase #:52 [DEMTEST] Files:1 Time: 2s
********** Upgrading Java and non-Java *********
Serial Phase #:53 [DEMTEST] Files:2 Time: 3s
***************** Upgrading XDB ****************
Restart Phase #:54 [DEMTEST] Files:1 Time: 1s
Serial Phase #:56 [DEMTEST] Files:3 Time: 14s
Serial Phase #:57 [DEMTEST] Files:3 Time: 7s
Parallel Phase #:58 [DEMTEST] Files:10 Time: 6s
Parallel Phase #:59 [DEMTEST] Files:25 Time: 12s
Serial Phase #:60 [DEMTEST] Files:4 Time: 14s
Serial Phase #:61 [DEMTEST] Files:1 Time: 0s
Serial Phase #:62 [DEMTEST] Files:32 Time: 8s
Serial Phase #:63 [DEMTEST] Files:1 Time: 0s
Parallel Phase #:64 [DEMTEST] Files:6 Time: 9s
Serial Phase #:65 [DEMTEST] Files:2 Time: 39s
Serial Phase #:66 [DEMTEST] Files:3 Time: 49s
**************** Upgrading ORDIM ***************
Restart Phase #:67 [DEMTEST] Files:1 Time: 2s
Serial Phase #:69 [DEMTEST] Files:1 Time: 4s
Parallel Phase #:70 [DEMTEST] Files:2 Time: 5s
Restart Phase #:71 [DEMTEST] Files:1 Time: 2s
Parallel Phase #:72 [DEMTEST] Files:2 Time: 4s
Serial Phase #:73 [DEMTEST] Files:2 Time: 5s
***************** Upgrading SDO ****************
Restart Phase #:74 [DEMTEST] Files:1 Time: 1s
Serial Phase #:76 [DEMTEST] Files:1 Time: 5s
Serial Phase #:77 [DEMTEST] Files:2 Time: 4s
Restart Phase #:78 [DEMTEST] Files:1 Time: 2s
Serial Phase #:79 [DEMTEST] Files:1 Time: 5s
Restart Phase #:80 [DEMTEST] Files:1 Time: 3s
Parallel Phase #:81 [DEMTEST] Files:3 Time: 4s
Restart Phase #:82 [DEMTEST] Files:1 Time: 4s
Serial Phase #:83 [DEMTEST] Files:1 Time: 4s
Restart Phase #:84 [DEMTEST] Files:1 Time: 3s
Serial Phase #:85 [DEMTEST] Files:1 Time: 4s
Restart Phase #:86 [DEMTEST] Files:1 Time: 3s
Parallel Phase #:87 [DEMTEST] Files:4 Time: 4s
Restart Phase #:88 [DEMTEST] Files:1 Time: 3s
Serial Phase #:89 [DEMTEST] Files:1 Time: 4s
Restart Phase #:90 [DEMTEST] Files:1 Time: 2s
Serial Phase #:91 [DEMTEST] Files:2 Time: 4s
Restart Phase #:92 [DEMTEST] Files:1 Time: 2s
Serial Phase #:93 [DEMTEST] Files:1 Time: 2s
Restart Phase #:94 [DEMTEST] Files:1 Time: 3s
******* Upgrading ODM, WK, EXF, RUL, XOQ *******
Serial Phase #:95 [DEMTEST] Files:1 Time: 3s
Restart Phase #:96 [DEMTEST] Files:1 Time: 2s
*********** Final Component scripts ***********
Serial Phase #:97 [DEMTEST] Files:1 Time: 3s
************* Final Upgrade scripts ************
Serial Phase #:98 [DEMTEST] Files:1 Time: 107s
******************* Migration ******************
Serial Phase #:99 [DEMTEST] Files:1 Time: 3s
*** End PDB Application Upgrade Pre-Shutdown ***
Serial Phase #:100 [DEMTEST] Files:1 Time: 2s
Serial Phase #:101 [DEMTEST] Files:1 Time: 0s
Serial Phase #:102 [DEMTEST] Files:1 Time: 41s
***************** Post Upgrade *****************
Serial Phase #:103 [DEMTEST] Files:1 Time: 31s
**************** Summary report ****************
Serial Phase #:104 [DEMTEST] Files:1 Time: 3s
*** End PDB Application Upgrade Post-Shutdown **
Serial Phase #:105 [DEMTEST] Files:1 Time: 2s
Serial Phase #:106 [DEMTEST] Files:1 Time: 0s
Serial Phase #:107 [DEMTEST] Files:1 Time: 29s

------------------------------------------------------
Phases [0-107] End Time:[2019_10_10 18:37:37]
------------------------------------------------------

Grand Total Time: 1902s

LOG FILES: (/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/catupgrd20191010180322demtest*.log)

Upgrade Summary Report Located in:
/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/upg_summary.log

Argument list for [/u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/catctl.pl]
For Oracle internal use only A = 1
Run in c = 0
Do not run in C = 0
Input Directory d = /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/temp
Echo OFF e = 1
Simulate E = 0
Forced cleanup F = 0
Log Id i = 20191010180322demtest
Child Process I = 0
Log Dir l = /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade
Priority List Name L = 0
Upgrade Mode active M = 0
SQL Process Count n = 0
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 = 1
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]


/u03/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/orahome = [/u03/app/oracle/product/19.0.0/dbhome_1]
/u03/app/oracle/product/19.0.0/dbhome_1/bin/orabasehome = [/u03/app/oracle/product/19.0.0/dbhome_1]
catctlGetOraBaseLogDir = [/u03/app/oracle/product/19.0.0/dbhome_1]

Analyzing file /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/temp/demtest_autocompile.sql

Log file directory = [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/demtest_autocompile20191010180322demtest_catcon_20343.lst]

catcon::set_log_file_base_path: catcon: See [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/demtest_autocompile20191010180322demtest*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/demtest_autocompile20191010180322demtest_*.lst] files for spool files, if any


Number of Cpus = 4
Database Name = DEMTEST
DataBase Version = 19.0.0.0.0
Components in [DEMTEST]
Installed [CATALOG CATPROC XDB]
Not Installed [APEX APS CATJAVA CONTEXT DV EM JAVAVM MGW ODM OLS ORDIM OWM RAC SDO WK XML XOQ]
PDB Serial Inclusion:[0] Exclusion:[0]
Running File In Serial Order FileName is /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/temp/demtest_autocompile.sql

Grand Total Time: 741s

In our case upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/autoupgrade20191010180322demtest.log

Also consider running console commands like,

upg>status

upg>tasks

upg>lsj

To monitor progress of upgrade.

  • Get location of logs.
upg> logs
Autoupgrade logs folder [/home/oracle/upgrade_to_19c/global_logs/cfgtoollogs/upgrade/auto/config_files]
logs folder [DEMTEST][/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs]
  • Name & Status of all tasks.
upg> tasks
+--+-------------------+-------------+
|ID|               Name|       Status|
+--+-------------------+-------------+
| 1|               main|      WAITING|
|24|           jobs_mon|      WAITING|
|25|           mgr_help|TIMED_WAITING|
|26|           watchdog|TIMED_WAITING|
|27|            console|     RUNNABLE|
|28|       queue_reader|      WAITING|
|29|              cmd-0|      WAITING|
|35|      job_manager-0|      WAITING|
|36|         bqueue-102|      WAITING|
|37|         checks-102|      WAITING|
|38|     rep_checks-102|TIMED_WAITING|
|65|DEMTEST-steady-ts-0|      WAITING|
|75|           quickSQL|     RUNNABLE|
+--+-------------------+-------------+
  • Status of AutoUpgrade
upg> status
---------------- Config -------------------
User configuration file [/home/oracle/upgrade_to_19c/DEMTEST_config.cfg]
General logs location [/home/oracle/upgrade_to_19c/global_logs/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 drop 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]
------------ Resources ----------------
Threads in use [39]
JVM used memory [60] MB
CPU in use [13%]
Processes in use [36]

List running jobs with Stage, Status, Start & End Time, Updated(Time of the printed information) and Message(Information about the job’s stage).

  • As we know, DEPLOY mode is running PRECHECKS first.
upg> lsj
+----+-------+---------+---------+-------+--------------+--------+--------+--------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+--------------+
| 102|DEMTEST|PRECHECKS|PREPARING|RUNNING|19/10/10 18:03| N/A|18:03:42|Remaining 1/72|
+----+-------+---------+---------+-------+--------------+--------+--------+--------------+
Total jobs 1

Now running PREFIXUPS.

+---------+-------+--------------+--------+--------+-------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED|MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+-------+
| 102|DEMTEST|PREFIXUPS|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:03:52| |
+----+-------+---------+---------+-------+--------------+--------+--------+-------+
Total jobs 1
  • Now actual upgrade started, in Message we can see 5% Upgraded, keep on monitoring the Upgrade.
upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+-----------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+-----------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:08:43|5%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+-----------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:11:44|10%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:14:45|21%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:23:49|36%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:26:50|39%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:29:51|51%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:32:52|71%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:37:48|94%Upgraded |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+-----------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+-----------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:38:56|0%Compiled |
+----+-------+---------+---------+-------+--------------+--------+--------+-----------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:41:58|83%Compiled |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:45:00|96%Compiled |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

upg> /
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
|JOB#|DB NAME| STAGE|OPERATION| STATUS| START TIME|END TIME| UPDATED| MESSAGE|
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
| 102|DEMTEST|DBUPGRADE|EXECUTING|RUNNING|19/10/10 18:03| N/A|18:48:02|99%Compiled |
+----+-------+---------+---------+-------+--------------+--------+--------+------------+
Total jobs 1

It is showing Percentage Compiled in message because we had set upg1.run_utlrp=yes in config file. It’s running utlrp.sql. You’ll get this detail from logs as well.

Note that if you’re upgrading multiple databases, you would see multiple jobs and their details in lsj console command.

Do also note that AutoUpgrade will create temporary parameter files for upgrade procedure in temp directory under specified upg1.log_dir in our case /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/temp. It will create 3 temporary parameter files which are,

[[email protected] temp]$ ls -lrth | grep pfile
-rw-r--r--. 1 oracle oinstall 543 Oct 10 17:12 before_upgrade_pfile_DEMTEST.ora
-rw-r--r--. 1 oracle oinstall 543 Oct 10 17:12 after_upgrade_pfile_DEMTEST.ora
-rw-r--r--. 1 oracle oinstall 642 Oct 10 17:53 during_upgrade_pfile_DEMTEST.ora

In format of before_upgrade_pfile_<dbname>.ora, during_upgrade_pfile_<dbname>.ora and after_upgrade_pfile_<dbname>.ora

Which will be used, as names says, before the upgrade, during the upgrade and after upgrade.

upg> 
-------------------------------------------------
Errors in database [DEMTEST]
Stage [DBUPGRADE]
Operation [EXECUTING]
Status [ERROR]
Info [demtest-Return status is ERROR]

-------------------------------------------------
Logs: [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade_20191010_user.log]
-------------------------------------------------

Oops, AutoUpgrade errored out. Let’s check above log to identify what did go wrong.

[[email protected] dbupgrade]$ tail /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade_20191010_user.log
2019-10-10 18:50:40.680 ERROR Database Upgrade Error in File [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/demtest_autocompile20191010180322demtest0.log] on Database [/home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/demtest_autocompile20191010180322demtest0.log]
2019-10-10 18:50:40.687 INFO End Compiling Invalid Objects on Database [demtest]
2019-10-10 18:50:40.688 ERROR COMPILED FAILED [demtest]
2019-10-10 18:50:40.688 ERROR Exception Error in Database Compiling Invalid Objects [UPG-1416#COMPILED FAILED [demtest]]
2019-10-10 18:50:43.005 ERROR UPGRADE FAILED [demtest]
2019-10-10 18:50:43.006 ERROR Exception Error in Database Upgrade [demtest]
2019-10-10 18:50:43.083 ERROR demtest Return status is ERROR
2019-10-10 18:50:43.090 ERROR [Unexpected Exception Error]
2019-10-10 18:50:43.094 INFO Starting error management routine
2019-10-10 18:50:43.095 INFO Ended error management routine

As logs says, autocompile got failed due to Unexpected Exception Error.

Let’s check upgrade summary log.

[[email protected] ~]$ cat /home/oracle/upgrade_to_19c/DEMTEST_upgrade_logs/102/dbupgrade/upg_summary.log

Oracle Database Release 19 Post-Upgrade Status Tool 10-10-2019 18:37:0
Database Name: DEMTEST

Component Current Full Elapsed Time
Name Status Version HH:MM:SS

Oracle Server UPGRADED 19.3.0.0.0 00:23:38
Oracle Real Application Clusters OPTION OFF 19.3.0.0.0 00:00:00
Oracle XML Database UPGRADED 19.3.0.0.0 00:02:32
Datapatch 00:01:40
Final Actions 00:01:49
Post Upgrade 00:00:28

Total Upgrade Time: 00:30:17

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:45m:42s]

Let’s try loging in to 19c and see if this can be fixed manually by compiling invalid objects again.


6. Make changes in .bash_profile pointing to new ORACLE_HOME.

[[email protected] ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=prod.demunix.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DEMTEST; export ORACLE_UNQNAME
ORACLE_BASE=/u03/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=DEMTEST; export ORACLE_SID

PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
echo "ORACLE PROFILE LOADED"

7. Move parameter file and password file to new ORACLE_HOME.

[[email protected] ~]$ cd /u01/app/oracle/product/12.2.0/dbhome_1/dbs/

[[email protected] dbs]$ cp initDEMTEST.ora /u03/app/oracle/product/19.0.0/dbhome_1/dbs/
[[email protected] dbs]$ cp spfileDEMTEST.ora /u03/app/oracle/product/19.0.0/dbhome_1/dbs/
[[email protected] dbs]$ cp orapwDEMTEST /u03/app/oracle/product/19.0.0/dbhome_1/dbs/

8. Compiled Invalid Objects running utlrp.sql manually.

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
  • And catuppst.sql for catlog upgrade post upgrade.
SQL> @$ORACLE_HOME/rdbms/admin/catppst.sql

9. Drop the Guaranteed restore point before bouncing the database otherwise you will get,

ORA-38880: Cannot advance compatibility from 12.2.0.0.0 to 19.0.0.0.0

due to guaranteed restore points while starting up and database won’t mount.

  • Hence, drop the guaranteed restore point.
SQL> SELECT NAME FROM V$RESTORE_POINT;

NAME
--------------------------------------------------------------------------------
AUTOUPGRADE_221145114461854_DEMTEST

SQL> DROP RESTORE POINT AUTOUPGRADE_221145114461854_DEMTEST;

Restore point dropped.

10. Bounce the database to use spfile.

SQL> show parameter pfile

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string

No spfile is in use. Let’s bounce the database.

  • Bounce the Database.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORACLE instance started.

Total System Global Area 436204272 bytes
Fixed Size 8897264 bytes
Variable Size 369098752 bytes
Database Buffers 50331648 bytes
Redo Buffers 7876608 bytes
ORA-00723: Initialization parameter COMPATIBLE must be explicitly set
  • Verify spfile is in use now.
SQL> show parameter pfile

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string /u03/app/oracle/product/19.0.0
/dbhome_1/dbs/spfileDEMTEST.ora

11. Set Compatible using alter system and then bounce the database again.

SQL> alter system set compatible='19.0.0' scope=spfile;

System altered.

Now bounce the database.

SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.

SQL> startup
ORACLE instance started.

Total System Global Area 436204272 bytes
Fixed Size 8897264 bytes
Variable Size 369098752 bytes
Database Buffers 50331648 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.

As we can see, database is now opened without error. Let’s check compatible. .

SQL> show parameter compatible

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
compatible string 19.0.0

12. Gather Dictionary Stats.

SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

PL/SQL procedure successfully completed.

13. Upgrade timezone file.

  • Show current version.
SQL> SELECT VERSION FROM V$TIMEZONE_FILE;

VERSION
----------
26

SQL> SELECT DBMS_DST.get_latest_timezone_version FROM DUAL;

GET_LATEST_TIMEZONE_VERSION
---------------------------
32

As we can see, latest timezone version is 32, we need to upgrade it.

  • Let’s shutdown the database and start it up in upgrade mode.
SQL> shut immediate; 
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup upgrade;
ORACLE instance started.

Total System Global Area 436204272 bytes
Fixed Size 8897264 bytes
Variable Size 369098752 bytes
Database Buffers 50331648 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.
  • Run below procedure to upgrade.
SQL> SET SERVEROUTPUT ON
DECLARE
l_tz_version PLS_INTEGER;
BEGIN
l_tz_version := DBMS_DST.get_latest_timezone_version;

DBMS_OUTPUT.put_line('l_tz_version=' || l_tz_version);
DBMS_DST.begin_upgrade(l_tz_version);
END;
/
SQL>
l_tz_version=32
An upgrade window has been successfully started.

PL/SQL procedure successfully completed.
  • Shutdown the database again and start it up in normal mode.
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 436204272 bytes
Fixed Size 8897264 bytes
Variable Size 369098752 bytes
Database Buffers 50331648 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.
  • Run below procedure.
DECLARE
l_failures PLS_INTEGER;
BEGIN
DBMS_DST.upgrade_database(l_failures);
DBMS_OUTPUT.put_line('DBMS_DST.upgrade_database : l_failures=' || l_failures);
DBMS_DST.end_upgrade(l_failures);
DBMS_OUTPUT.put_line('DBMS_DST.end_upgrade : l_failures=' || l_failures);
END;
/
SQL>
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_S"
Number of failures: 0
Table list: "GSMADMIN_INTERNAL"."AQ$_CHANGE_LOG_QUEUE_TABLE_L"
Number of failures: 0
DBMS_DST.upgrade_database : l_failures=0
An upgrade window has been successfully ended.
DBMS_DST.end_upgrade : l_failures=0

PL/SQL procedure successfully completed.
  • Show the version now.
SQL> SELECT VERSION FROM V$TIMEZONE_FILE;

VERSION
----------
32
  • Check in registry$database table.
SQL> select TZ_VERSION from registry$database;

TZ_VERSION
----------
26
  • Update in resgistry$database table.
SQL> update registry$database set TZ_VERSION = (select version FROM v$timezone_file);

1 row updated.

SQL> select TZ_VERSION from registry$database;

TZ_VERSION
----------
32

14. Edit /etc/oratab.

[[email protected] product]$ vi /etc/oratab
DEMTEST:/u03/app/oracle/product/19.0.0/dbhome_1:Y

15. Final check before releasing.

SQL> SELECT NAME,HOST_NAME,VERSION,OPEN_MODE FROM V$DATABASE,V$INSTANCE;

NAME HOST_NAME VERSION OPEN_MODE
--------------- -------------------- --------------- --------------------
DEMTEST bcp.demunix.com 19.0.0.0.0 READ WRITE

16. Bring up the listner from new ORACLE_HOME.

  • Start the listener
[[email protected] ~]$ lsnrctl start

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 10-OCT-2019 20:42:39

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Starting /u03/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Log messages written to /u03/app/oracle/diag/tnslsnr/bcp/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bcp)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 10-OCT-2019 20:42:40
Uptime 0 days 0 hr. 0 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u03/app/oracle/diag/tnslsnr/bcp/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bcp)(PORT=1521)))
The listener supports no services
The command completed successfully
  • Link Service.
[[email protected] ~]$ lsnrctl services

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 10-OCT-2019 20:44:52

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "DEMTEST" has 1 instance(s).
Instance "DEMTEST", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
  • Status.
[[email protected] ~]$ lsnrctl status

LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 10-OCT-2019 20:45:03

Copyright (c) 1991, 2019, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 10-OCT-2019 20:42:40
Uptime 0 days 0 hr. 2 min. 23 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u03/app/oracle/diag/tnslsnr/bcp/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=bcp)(PORT=1521)))
Services Summary...
Service "DEMTEST" has 1 instance(s).
Instance "DEMTEST", status READY, has 1 handler(s) for this service...
The command completed successfully

There you go, We have successfully upgraded the database from 12.2.0.1 to 19.0.0.0

Peace 🙂