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




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

How to upgrade to Oracle Database 18c from 12c on Linux

Following, the step to upgrade an Oracle Database 12c to a new Oracle Database 18c (version 18.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. 

We are used an an Oracle Linux 7.5 environment.

#STEP1: Download Oracle Database 18.3 release
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-linux-180000-5022980.html

#STEP2: Install the software 
Open Linux Desktop or setting X11
mkdir /oracle/product/18
cd /oracle/product/18
unzip LINUX.X64_180000_db_home.zip
export ORACLE_HOME=/oracle/product/18
./runInstaller




Read moreHow to upgrade to Oracle Database 18c from 12c on Linux

How to install a release patch on database 12.1 or 12.2

The installation of oracle database patches is an operation not to be taken for granted. Unlike other systems or subsystems it is necessary to perform a series of steps manually.

Below there is the complete list of commands and an example for apply a patch called “release” (that includes the correction of many bugs without introducing substantial changes in performance) on a 12.2 database in an Oracle Linux 7.5 environment

Here’s how to install a release patch on 12.1 or 12.2 database:

#STEP1: Download patches 
 https://support.oracle.com
 - How To Download And Install The Latest OPatch(6880880) Version (Doc ID 274526.1) 
    (https://updates.oracle.com/download/6880880.html)
 - Oracle Database (RDBMS) Releases Support Status Summary (Doc ID 161818.1)

#STEP2: Setting envs 
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export ORACLE_SID=orcl

#STEP3: Close database
lsnrctl stop
sqlplus -s / as sysdba <<EOF
shutdown immediate
exit
EOF

#STEP4: Backup 
mkdir /oracle/backup/

## Backup $ORACLE_HOME 
tar -czvf /oracle/backup/oracle_home.tar.gz $ORACLE_HOME > /oracle/backup/oracle_home.tar.log

## Backup Database 
rman target / <<EOF 
startup mount;
run {
backup database format '/oracle/backup/rman_db_%t_set%s_piece%p_dbid%I';
backup current controlfile format '/oracle/backup/rman_cntl_%t_set%s_piece%p_dbid%I';
backup spfile format '/oracle/backup/rman_spf_%t_set%s_piece%p_dbid%I';
}
shutdown immediate;
exit
EOF

#STEP5: Update OPatch
cd $ORACLE_HOME
mv OPatch OPatch.old
unzip /oracle/software/p6880880_180000_Linux-x86-64.zip -d $ORACLE_HOME
opatch version 
opatch lsinv

#STEP6: Update $ORACLE_HOME
unzip /oracle/software/p27674384_122010_Linux-x86-64.zip -d /oracle/software/
cd /oracle/software/27674384
opatch prereq CheckApplicable -oh $ORACLE_HOME -ph /oracle/software/27674384
opatch apply
opatch lspatches

#STEP7: Open database
lsnrctl start
sqlplus -s / as sysdba <<EOF
startup
exit
EOF
 
#STEP8: Post Patches
$ORACLE_HOME/OPatch/datapatch -prereq
$ORACLE_HOME/OPatch/datapatch -verbose
sqlplus -s / as sysdba << EOF
@$ORACLE_HOME/rdbms/admin/utlrp.sql 
exit
EOF
sqlplus -s / as sysdba << EOF
SET LINESIZE 160
COLUMN action_time FORMAT A20
COLUMN action FORMAT A10
COLUMN status FORMAT A10
COLUMN description FORMAT A60
COLUMN version FORMAT A10
COLUMN bundle_series FORMAT A10
SELECT TO_CHAR(action_time, 'DD-MON-YYYY HH24:MI:SS') AS action_time,
 action,
 status,
 description,
 version,
 patch_id,
 bundle_series
FROM dba_registry_sqlpatch
ORDER by action_time;
EOF

Practical example output:

Read moreHow to install a release patch on database 12.1 or 12.2