Skip to Content
Technical Articles

SAP Oracle upgrade from 12C to 19C on Azure

SAP Oracle upgrade from 12C to 19C on Azure


Summary :-

This document comprises the steps, How to do the oracle upgrade 12C to 19C on Azure environment with OS(oracle Linux 7) and same method for SUSE Linux as well. I have gathered the information from some SAP Snotes and upgrade document from SAP Website. The following method will reduce the downtime of SAP application. Install the oracle database software only and then do the upgrade using DBUA method.  The below documents are prepared based on oracle 19c upgrade on done on April- Jun  2020 in Azure environment based downtime agreed.

Author: Brindavan Mookaiah

Designation: Senior SAP BASIS Consultant

Environment : SAP ERP 2005
Database      : ORACLE 12c
Operating system level : Oracle Linux 7.8

SAP Oracle 19C support :-

Premier Support    : The SAP Oracle 19c support start from march 2019 and End 31 march 2023

Extended Support : 1st April 2023 and end 31 March 2026

In SAP before any upgrade or update first check in PAM(Product Availability Matrix) about the SAP systems & related software support in the below link.

Important SAP Snotes :-

There are many SAP Snotes need to go through before upgrading oracle database based on your SAP system environment.

Check the following SAP Notes for more information before you upgrade to 19c.

SAP Note Number Contents/Description
SAP Note 2799900 Central Technical Note for Oracle Database 19c
SAP Note 2540847 SAP Guides for Oracle Database Upgrade
SAP Note 2800001 Upgrading to Oracle Database 19c (DBUA)
SAP Note 2800021 Upgrading to Oracle Grid Infrastructure 19c
SAP Note 2660017 Oracle Database Software Installation on Unix
SAP Note 2660018 Oracle Database Software Installation on Windows
SAP Note 2470718 2470718 – Oracle Database Parameter 12.2 / 18c/19c

Additional useful SAP Notes:

SAP Note 1915324 How to find the ORACLE_HOME of a running Oracle Database Instance
SAP Note 2659888 Using Oracle Tools as SAP Administrator Account <sapsid>adm on Unix

Director upgrade supported/not supported to Oracle Database 19c for the current source system.

Current Release                                                                   Upgrade Options

18,,,                                            Direct upgrade is supported.,,,, 11.1, 10.2 or earlier   Direct upgrade is not supported. ( Need to  be upgraded to the recommended version for oracle 19C)

Filesystem /RAM/SWAP:- 

Filesystem : Create a New separate filesystem which have minimum 20 GB of frees-pace to install oracle 19c and latest SBP and oracle base filesystem need minimum 5GB free space.

For example :-  “/oracle/SID/19.0.0 ”    –> 20GB free-space

For example :- “/oracle”     current oracle base filesystem need minimum 5GB free-space.

RAM     : At least 8 GB RAM

SWAP   : Minimum swap required space 16GB for oracle 19C.

Also the current oracle (18,,,  of your current database should be updated with latest SBP patch which is recommended by SAP.

Oracle Installation Prerequisites ( Applicable only for oracle Linux 7 or higher)

Automatic Setup :-

If you plan to use the “oracle-database-preinstall-19c” package to perform all your prerequisite setup, issue the following command.

# yum install -y oracle-database-preinstall-19c
# yum update -y

Manual step:-

If you have not used the “oracle-database-preinstall-19c” package to perform all prerequisites, you will need to manually perform the below following setup tasks.

Add the following lines to the “/etc/sysctl.conf” file, or in a file called “/etc/sysctl.d/98-oracle.conf” using VI editor.

fs.file-max = 6815744
kernel.sem = 1250 256000 100 1024
kernel.shmmni = 4096
kernel.shmall = <Based on hardware hardware infrastructure for SAP system>
kernel.shmmax = <Based on hardware hardware infrastructure for SAP system>
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range = 9000 65500

Run one of the following commands to change the current kernel parameters, depending on which file you edited.

/sbin/sysctl -p
# Or
/sbin/sysctl -p /etc/sysctl.d/98-oracle.conf

Add the following lines to a file called “/etc/security/limits.conf or “/etc/security/limits.d/oracle-database-preinstall-19c.conf” file.

ora<SID> soft nofile 1024
ora<SID> hard nofile 65536
ora<SID> soft nproc 16384
ora<SID> hard nproc 16384
ora<SID> soft stack 10240
ora<SID> hard stack 32768
ora<SID> hard memlock 134217728
ora<SID> soft memlock 134217728


The following packages are listed as required. Many of the packages should be installed already.

#yum install -y bc
#yum install -y binutils
#yum install -y compat-libcap1
#yum install -y compat-libstdc++-33
#yum install -y dtrace-modules
#yum install -y dtrace-modules-headers
#yum install -y dtrace-modules-provider-headers
#yum install -y dtrace-utils
#yum install -y elfutils-libelf
#yum install -y elfutils-libelf-devel
#yum install -y fontconfig-devel
#yum install -y glibc
#yum install -y glibc-devel
#yum install -y ksh
#yum install -y libaio
#yum install -y libaio-devel
#yum install -y libdtrace-ctf-devel
#yum install -y libXrender
#yum install -y libXrender-devel
#yum install -y libX11
#yum install -y libXau
#yum install -y libXi
#yum install -y libXtst
#yum install -y libgcc
#yum install -y librdmacm-devel
#yum install -y libstdc++
#yum install -y libstdc++-devel
#yum install -y libxcb
#yum install -y make
#yum install -y net-tools # Clusterware
#yum install -y nfs-utils # ACFS
#yum install -y python # ACFS
#yum install -y python-configshell # ACFS
#yum install -y python-rtslib # ACFS
#yum install -y python-six # ACFS
#yum install -y targetcli # ACFS
#yum install -y smartmontools
#yum install -y sysstat

#yum install -y unixODBC


Oracle Pre-install check Steps:-

  1. Take full backup of database  ( Run full backup before upgrade & Take back of oracle_home directory. oracle inventory and oracle profile,)
  2. Download the required software for the upgrade in using SUSER_ID ( Download the oracle 19c software) and placed in sperate location.
  3. Set the environment variable to run the Pre-install checks.

check the RUNINSTALLER version on oracle 19c using the below command.

Install the SAP oracle 19C Software only with 10 Steps Movement. Login with oraSID or oracle user and set the oracle environment  “setenv” command for CSH and “export” for !bash based of user-id which belongs to your login.

Click on installed software only for installing the oracle 19c binary files in new mounted filesystem”/oracle/SID/19.0.0″.

Most of the SAP system have enterprise edition of database. Select the Enterprise Edition and Click  next.

select the oracle base location and Click Next.

Here I am overwriting the existing oracle Central Inventory for new oracle 19c to maintain. Make sure you have the taken the old oracle inventory files in case to do the fall back.

Select the DBA and OPER group and Click next.

The new option for oracle upgrade19c to run the script automatically to avoid manual login in root user-id. Here I have unselected the “Automatically run Configuration scripts” to run manually.

If you select this option, you have to maintain the root user-id & password to run the script automatically, Which will be taken care by RUNINSTALLER.

In case any pre-requisite checks pending or failed; you have to fix the issue and move further.

Minimum swap required space 16GB for oracle 19C. Click next

The summary show the parameter & location which you have define just cross-check once again and Click Next

The oracle Installation started and finished minimum 15 to 30mins based on your hardware setup.

Login to the root user and run the script. Once done; Click next.

The oracle 19c Installation has been completed successfully and click on close.

check the file system ” /oracle/SID/19.0.0 that the oracle installed and able to see the installed files and in filesystem “/oracle/SID that the softlink if created “19.0.0” to “19”.

Download the latest SBP patch from and read me file as well.

Caution :- Install the Latest SBP patch as well for SAP Oracle 19C and carefully read the Readme file and set the environment variable for ORACLE 19c SBP patch and don’t not run the catsbp.sql.

For example to set the environment variable :-

  • > setenv IHRDBMS /oracle/<SID>/19.0.0
  • >setenv OHRDBMS /oracle/<SID>/19
  • >setenv ORACLE_SID <SID>
  • >setenv ORACLE_HOME /oracle/<SID>/19.0.0

The above steps are done during the system online on fly and the next step which you need offline mode(Downtime only SAP Application).

Source Database Pre-checks :-

  • check the database current version for 12c

  • Check the Invalid object  (SQL>select owner,object_name,object_type from dba_objects where status = ‘INVALID’;

  • check the history of SBP patch. (SQL> select patch_id,action,status,action_time,description,bundle_series,bundle_id from dba_registry_sqlpatch;

Stop the oracle backup in case run, check the crontab for oracle database jobs and comment the same.  Take one completed SAP and oracle Home backup as well.

Loginto OS level with SIDadm and stop SAP

$ stopsap r3

You can also stop the SAP application server with the sapcontrol tool:

$ sapcontrol -nr -function Stop

Login with oraSID with DBA group in OS-level and set the enviorment.

Set the environment variable of source database and target database like below command in screen shot.

Go to the below location in screen shot and  run the pre-upgrade script.

Pre- Upgrade steps

$ sqlplus / as sysdba

SQL> @pre_upgrade_tasks.sql

SQL> @pre_upgrade_check.sql

Once the pre-upgrade scripts are successful then start the DBUA method for upgrade in the below location screen-shot.

In case Pre-upgrade scripts are failed and need to fix the issue before start the upgrade.

Stop the listener as well in case if you are going to use the old one. Also check if any SAP process running at OS-level and stop the same.

Database Upgrade Assistant – Step 8 Movement

The below screen-shot show the source of the  current database version to upgrade. Click Next

The Pre-requisite Checks started and Click on next once completed.

Select the three option and Click next.

Run the full completed backup or select in case if you have already performed the full backup ” I have my own backup and restore strategy”

Stop the Listener or else it will be overwrite. In case new listener required you can create the same.

Here the below screen-shot show blank, because I have already stopped the listener . In case if its running than the screen appear with listener parameter like next to the blank Configuration network screen-shot.

Click on Next

Check the summary and Click on next.

The actual oracle upgrade started and will reach 34 % in 20mins and also check the logs for troubleshooting in case its failed.

It will take more-than 30mins to complete the upgrade.

The oracle upgrade form 12C to 19C has been completed successfully.

Once the upgrade completed .

  • Start the oracle listener
  • Start the database

Also go to the below location in screen shot and Run the post upgrade steps.

Perform post-upgrade tasks.

SQL> @post_upgrade_tasks.sql

SQL> @post_upgrade_checks.sql

Important run the catsbp.sql to complete the SBP patch steps as well and set necessary parameter which you can find in readme.html file.

Login to the OS-level with oraSID and set the new environment variable.

  • > setenv IHRDBMS /oracle/<SID>/19.0.0
  • > setenv OHRDBMS /oracle/<SID>/19
  • > setenv ORACLE_SID <SID>
  • > setenv ORACLE_HOME /oracle/<SID>/19.0.0

Also upgrade the oracle client 19c which you can find and download in link

Login to SIDadm user and oraSID user

  1. to change the old ORACLE_HOME  “/oracle/SID/12 (12c) location to new Oracle_HOME (19c) “/oracle/SID/19 location in *.sh or .*csh in environment variable files.
  2. To change the old Oracle client  to new oracle client as well.

Once all the environments variable are set to the new location of oracle 19c and oracle client 19.

Check the current directories for new oracle 19c and change accordingly in case pointed to the old oracle 12c.  Check with the below SQL query for the same.

OS> sqlplus / as sysdba
SQL> spool post_upgrade_dba_directories.log
SQL> column owner format a30
SQL> column directory_name format a30
SQL> column directory_path format a50
SQL> set linesize 120
SQL> set pagesize 100
SQL> select owner, directory_name, directory_path from dba_directories order by 1,2;
SQL> spool off
SQL> quit

Perform the complete successful restart of oracle 19C database. Once the oracle database and listener started.

Then check the ” R3trans -d command and it should be zero of output.

  1. Login to SIDadm and start the SAP system ” startsap r3
  2. Login into OS-level with SIDadm user and run the below command You can perform this later if required.

$ brconnect -u / -c -f stats -t system_stats

$ brconnect -u / -c -f stats -t oradict_stats

$ brconnect -u / -c -f stats -t all -f collect -p 4

Last steps :-  Run complete full-online/offline Backup of the SAP system.

In oracle 19c there is recommendation of GRP(Guaranteed Restore Point) you can use this option for safer side.

Recommendation – Creating a Guaranteed Restore Point

Before you start the upgrade, you can create a guaranteed restore point (GRP).

  • If the upgrade fails (errors during pre-upgrade, upgrade or post-upgrade), you can flashback the database back to the GRP.
  •  If you are not satisfied with the result of the upgrade, you can flashback the database back to the GRP.
  •  If you want to re-run the upgrade for test purposes, you can flashback the database back to the GRP.


  •  Creating a guaranteed restore point before the upgrade is optional.
  • A guaranteed restore point is no replacement for a database backup.
  • After the upgrade you must drop the guaranteed restore point before you can increase database parameter ‘COMPATIBLE’ to the new value (set_compatible.sql).
  • After the upgrade You must drop the guaranteed restore point before you release the database for production.

For release 19c we suggest to create a GRP named “GRP_BEFORE_UPGRADE_19” (name format “GRP_BEFORE_UPGRADE_<release>”).

More details of the GRP script check in SAP SNOTE :  2800001 – Upgrading to Oracle Database 19c (DBUA)

SAP/Oracle Reference Link :-




You must be Logged on to comment or reply to a post.
  • Nice document. But for me it looks like a general upgrade document. Since you mentioned Azure in the Header, I anticipated some Azure-relevant steps and configuration. If there are no Azure-specific steps included, I recommend to mention Azure only on the “sidenote”.

    • Hi Janos,


      Thank you for the comment. The steps are completed performed on Azure with oracle Linux 7.8 and oracle upgrade will be the same.  That’s why I have mentioned all the relevant  rpm package & parameter to set by SAP BASIS itself. This will help for someone who will perform the oracle upgrade 19c in Azure.

      No worries steps will be the same.