How to upgrade to Oracle Database 19c from 18c on Linux with autoupgrade tool

Following, the steps to upgrade from Oracle Database 18c to new Oracle Database 19c (version 19.3)  

During the upgrade, the database can’t provide any service because will be open with “upgrade” option. Ensure to have a database backup before apply the upgrade. 

Autoupgrade is a new oracle tool to upgrade database automatically. 

We used an an Oracle Linux 7.6 environment.

#STEP1: Download Oracle Database 19.3 release
https://download.oracle.com/otn/linux/oracle19c/190000/LINUX.X64_193000_db_home.zip

#STEP2: Install the software
sudo yum -y install oracle-database-preinstall-19c.x86_64
Plugin abilitati:langpacks, ulninfo
Risoluzione dipendenze
--> Esecuzione del controllo di transazione
---> Pacchetto oracle-database-preinstall-19c.x86_64 0:1.0-1.el7 settato per essere installato
--> Risoluzione delle dipendenze completata

Dipendenze risolte
Installazione:
 oracle-database-preinstall-19c    

Install  1 Pacchetto
Dimensione totale del download: 18 k
Dimensione installata: 55 k
Downloading packages:
oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm                                                                            |  18 kB  00:00:04     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installazione     : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                             1/1 
  Verifica in corso : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                             1/1 

Installato:
  oracle-database-preinstall-19c.x86_64 0:1.0-1.el7                                                                                                   

Completo!

=>Open Linux Desktop or setting X11<=
mkdir /oracle/product/19
cd /oracle/product/19
unzip /media/sf_Downloads/LINUX.X64_193000_db_home.zip -d /oracle/product/19
export ORACLE_HOME=/oracle/product/19
./runInstaller




            
[oracle@ol7 ~]$ sudo /oracle/product/19/root.sh
Performing root user operation.

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/19

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) 
[n]: 
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) 
[n]:

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Oracle Trace File Analyzer (TFA - Standalone Mode) is available at :
/oracle/product/19/bin/tfactl

Note :
1. tfactl will use TFA Service if that service is running and user has been granted access
2. tfactl will configure TFA Standalone Mode only if user has no access to TFA Service or 
TFA is not installed



#STEP3: Download autoupgrade last release

Download last version about "autoupgrade" from (Doc ID 2485457.1)
https://support.oracle.com/epmos/faces/DocumentDisplay?id=2485457.1

unset LANG
/oracle/product/19/jdk/bin/java -jar autoupgrade.jar -version
build.version 20190513
build.date 2019/05/13 16:59:48

#STEP4: Prepare autoupgrade 

mkdir /home/oracle/autoupgrade
cd /home/oracle/autoupgrade
/oracle/product/19/jdk/bin/java -jar autoupgrade.jar -create_sample_file config

mv sample_config.cfg config.txt
vi config.txt
<===>
global.autoupg_log_dir=/home/oracle/autoupgrade
upg1.dbname=orcl
upg1.start_time=NOW
upg1.source_home=/oracle/product/18
upg1.target_home=/oracle/product/19
upg1.sid=orcl
upg1.log_dir=/home/oracle/autoupgrade
upg1.upgrade_node=ol7
upg1.target_version=19.3
upg1.run_utlrp=yes
upg1.timezone_upg=yes
<===>

#STEP5: Analize

/oracle/product/19/jdk/bin/java -jar autoupgrade.jar -config config.txt -mode analyze
Autoupgrade tool launched with default options +--------------------------------+ | Starting AutoUpgrade execution | +--------------------------------+ 1 databases will be analyzed Type 'help' to list console commands upg> Job 101 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished successfully [1] Jobs failed [0] Jobs pending [0] ------------- JOBS FINISHED SUCCESSFULLY ------------- Job 101 FOR ORCL #STEP6: Deploy
/oracle/product/19/jdk/bin/java -jar autoupgrade.jar -config config.txt -mode deploy
#STEP7: Monitoring deploy upgrade
upg> lsj +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ | 101| ORCL|DBUPGRADE|EXECUTING|RUNNING|19/05/29 21:54| N/A|22:00:00|8%Upgraded | +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ Total jobs 1 upg> upg> lsj +----+-------+---------+---------+-------+--------------+--------+--------+------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+-------+--------------+--------+--------+------------+ | 101| ORCL|DBUPGRADE|EXECUTING|RUNNING|19/05/29 21:54| N/A|22:25:54|93%Upgraded | +----+-------+---------+---------+-------+--------------+--------+--------+------------+ Total jobs 1 upg> lsj +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ | 101| ORCL|DBUPGRADE|EXECUTING|RUNNING|19/05/29 21:54| N/A|22:27:32|0%Compiled | +----+-------+---------+---------+-------+--------------+--------+--------+-----------+ Total jobs 1 upg> lsj +----+-------+----------+---------+-------+--------------+--------+--------+---------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+----------+---------+-------+--------------+--------+--------+---------------+ | 101| ORCL|POSTCHECKS|PREPARING|RUNNING|19/05/29 21:54| N/A|22:35:10|Loading DB info| +----+-------+----------+---------+-------+--------------+--------+--------+---------------+ Total jobs 1 upg> lsj +----+-------+----------+---------+-------+--------------+--------+--------+-------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+----------+---------+-------+--------------+--------+--------+-------------+ | 101| ORCL|POSTCHECKS|PREPARING|RUNNING|19/05/29 21:54| N/A|22:36:06|Remaining 6/6| +----+-------+----------+---------+-------+--------------+--------+--------+-------------+ upg> lsj +----+-------+-----------+---------+--------+--------------+--------+--------+-------------+ |Job#|DB_NAME| STAGE|OPERATION| STATUS| START_TIME|END_TIME| UPDATED| MESSAGE| +----+-------+-----------+---------+--------+--------------+--------+--------+-------------+ | 101| ORCL|POSTUPGRADE|EXECUTING|FINISHED|19/05/29 21:54| N/A|22:42:46|RESTARTING_DB| +----+-------+-----------+---------+--------+--------------+--------+--------+-------------+ Total jobs 1 upg> Job 101 completed ------------------- Final Summary -------------------- Number of databases [ 1 ] Jobs finished successfully [1] Jobs failed [0] Jobs pending [0] ------------- JOBS FINISHED SUCCESSFULLY ------------- Job 101 FOR ORCL

#STEP8: Check upgrade sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Ven Mag 31 21:50:48 2019 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connesso a: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 SQL> set lines 180 SQL> col COMP_NAME for a40 SQL> col VERSION_FULL for a40 SQL> select COMP_NAME, VERSION_FULL from dba_registry; COMP_NAME VERSION_FULL ---------------------------------------- ---------------------------------------- Oracle Database Catalog Views 19.3.0.0.0 Oracle Database Packages and Types 19.3.0.0.0 Oracle Real Application Clusters 19.3.0.0.0 Oracle XML Database 19.3.0.0.0 Oracle Workspace Manager 19.3.0.0.0
#STEP9: Deinstall old release
/oracle/product/18/deinstall/deinstall


UPGRADE DONE!

 

1 thought on “How to upgrade to Oracle Database 19c from 18c on Linux with autoupgrade tool”

Leave a Comment