Skip to Content

SAP Oracle upgrade 11G to 12C on AIX

                                 SAP Oracle Upgrade 11G to 12C on AIX


This document contains the steps that how to do the oracle upgrade 11 G to 12 C.  I have gathered the information from some SAP Notes and upgrade document from SAP site.  The following method will reduce the downtime of SAP application.First install the oracle database software only and then do the upgrade using DBUA method.

Author: Brindavan Mookaiah

Designation: SAP BASIS Consultant

Table of content:-

1) Take full backup of database ………………………………………………

2) Download the software required for the upgrade……………………….

3) Check and, if necessary, set the DISPLAY environment variable ..

4) Configure Secure Storage in File System……………………………….

5) Migrate to the Oracle Database Software Owner oracle…………….

6) Extract the Oracle software………………………………………………..

7) Install the Oracle database software …………………………………….

8) Run the pre-upgrade scripts………………………………………………..

9) Upgrade from 11g to 12G with using DBUA method…………………

10) Performa the post upgrades scripts…………………………………….

11) Perform the post upgrade steps………………………………………….

Oracle 12c Architecture:-


Information on eye :-

There are two main SAP note need to go through before upgrading oracle database.

  • SAP Note :2133079 – Oracle Database 12c: Integration in SAP environment
  • SAP note :1914631 provides important technical information about using Oracle 12.1 in a SAP environment, like database installation/upgrade guidelines, software download, patches, etc.

Oracle Upgrade requirements to meet the software:-

1) Database Direct upgrade / upgrade to

2) Oracle Database 12c Release 1 (12.1) is only released and certified for SAP products running with SAP BASIS 7.00 and above,

     and SAP kernel release 7.21   EXT and above

3) OS level fix required to fix during upgrade or before.

4) create filesystem like ” /oracle/SID/121″

1) Take full backup of database

  •    Run full backup before upgrade
  •    Take back of oracle_home directory and oracle profile

2) Download the software required for the upgrade

  •    Download the Oracle Database 12c Release 1 (12.1) software, required patches, and Oracle 12.1 Instant Client software from:         “ Oracle”
  • Download the latest version of the DBATOOLS (BR*Tools) to be used immediately after the database upgrade from: “”  BR*Tools supports the Oracle Database 12c Release 2 (12.1), as of release 7.20 (patch level 40).or Release patch level 1) . For more information, see SAP Note 2087004

3) Check and, if necessary, set the DISPLAY environment variable

  •    Set the DISPLAY environment variable to Shell export DISPLAY=hostname:0:0 if you use x-mangare or x-trem

4) Configure Secure Storage in File System

  •   Follow the procedure described in SAP Notes 1639578 and 1622837, which describe the configuration of SSFS in detail.
  • Check that the environment variables from SSFS have been changed in the .sapenv* files.

5) Migrate to the Oracle Database Software Owner oracle


Create the directory to place the extracted software:

● Oracle software stage directory

● Oracle inventory directory

Procedure 1.

For the extraction of the software for Oracle Database 12c Release 1 (

create the staging directory:

$  mkdir -p /oracle/stage/12102

$ chmod 755 /oracle/stage/12102


$ cd /oracle/stage/12102

$ SAPCAR -xvf /OR112164.SAR

$ SAPCAR -xvf /OR212164.SAR

Process Flow

  1.   Back up the central Oracle inventory
  2.   Update the SAP RUNINSTALLER installation scripts.
  3.   Check the software installation prerequisites.
  4.   Install the current Oracle database patch set.
  5.   Install the current SAP bundle patch.


  1.   Back up the central Oracle inventory

For  AIX, HP-UX, Solaris SPARC:

/var/opt/oracle/oraInst.loc ○

For  Linux: /etc/oraInst.loc

inventory_loc= <path_to_oracle_inventory>

Make a copy of the inventorty

$ cp -r oraInventory oraInventory..SAVE

Note: check the patch level of the RUNINSTALLER and check in SAP Note 1915301 whether a higher version is available. Update the higher version if required.

7)  Update the SAP RUNINSTALLER installation scripts.

Note: check the patch level of the RUNINSTALLER and check in SAP Note 1915301 whether a higher version is available. Update the higher version if required.

Login to the OS level with ora_sid or X-manager and go the directory where the media file available.Install Oracle Database Release 12.1 software, see SAP Note 1915301.

For Example:

$ cd /oracle/stage/121/database/SAP

$  ./RUNINSTALLER –version

During installation step it will ask to apply missing OS patches and OS packages and set OS kernel parameters as recommended by the OUI

On AIX, call the script as user root:

$  /oracle/stage/12102/database/

You can find the oracle installation software screen shot in following link this might be same.

Oracle12c Database Installation steps

3)  You need to install the current (or latest) SAP bundle patch (SBP) into the new Oracle home once the patch done. You must install the SBP using the Oracle tool MOPatch. For more details see SAP Note 1027012. To install the generic patch, see also SAP Note 1915315.


  •   Log on as the Oracle database software owner <ora_SID>.
  •   Download the required patches.
  •   Install the SBP into the new Oracle home according to the instructions in the SBP README file.

The installation of the SBP consists of these steps: 1. The installation of the SBP software into the Oracle home. 2. The change of the database structure and database properties (dictionary, parameter, properties)


Note : Once the installation binary done then run the Oracle pre-upgrade scripts check in SAP Note: 1915315.

Check the environmental ORACLE_HOME, ORACLE_SID and ORACLE_BASE. Make sure that ORACLE_HOME is set to the value of the current Oracle home.

8) Run the pre-upgrade scripts


Login into the OS level with ora_sid user.

For example:

$ cd /oracle//12102/sap/ora_upgrade/pre_upgrade

$ sqlplus / as sysdba

SQL> @pre_upgrade_tasks.sql


Recommendation set parameter before upgrade:


COMPATIBLE is set to a value < 11, do not change this parameter before the upgrade from 10.2 to 12c although this is recommended by the pre-upgrade script.

Stop SAP Application

Loginto  OS level with ORA_ADM and stop SAP

$ stopsap r3

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

$ sapcontrol -nr -function Stop

Make sure that the software owner <ora_swo> has write permissions (664) on the oratab file, which is

either /etc/oratab or /var/opt/oracle/oratab, depending on your operating system.

● Make sure that oratab contains the entry <DBSID>:<Oracle_home>:N


Oracle 11g: OQ1:/oracle/OQ1/112_64: N

Oracle 10g: OQ1:/oracle/OQ1/102_64: N

Set the environment variables ORACLE_HOME_SRC and ORACLE_HOME_TGT, DB_SID, and ORACLE_BASE before you run the scrpit.


  • export ORACLE_HOME_SRC=/oracle/<DBSID>/112_64
  • export ORACLE_HOME_TGT=/oracle/<DBSID>/12102
  • export DB_SID=<DBSID>

9) Upgrade from 11g to 12G with using DBUA method

Start the DBUA. is a wrapper script for 11g To 12C, once the upgrade done then run the  post-upgrade tasks.

Loginto the OS level with ora_sid user

$ ./

Note : This is only reference screen shot.


  1. The screen will appear to select Upgrade Oracle Database and then click –>  Next.


This will tell the source database and target database for upgrade. If the location path are ok then click –> Next


Click –> Next


On the Upgrade Options screen, select the following fields:

  •    Recompile invalid objects
  •    Upgrade Timezone Data If required, you can check the following:
  •    Gather statistics before the upgrade (takes some time)
  •   Set User Tablespaces to Read Only and then click –> Next


The next screen will ask to select the database type like EM cloud control or EM express and then click –> Next


Do not select any of the checkboxes for Moving database and then click –>  Next


The Network Configuration screen ignore and go for default selection and then click –> Next


The Recovery Options screen select the option “I have my own backup” and chose –> Next


On the Summary screen, review the Database Upgrade Summary and if you satisfied the click –>  Finish


8. The upgrade will start and once it finished then Click on Upgrade Results to see the results of the upgrade. 11. On the Results screen, after reviewing the upgrade results.


Click Close to close the DBUA.

11) Perform the post upgrade steps

1. You update the SQL*Net configuration files

     Logininto the OS level with ora_sid

“The easiest method to do this is to just copy the complete LISTENER_ entry from the file /network/admin/tnsnames.ora and add this entry unchanged to the file in /network/admin and $TNS_ADMIN/tnsnames.ora on the SAP side”

2. You check the symbolic link for the runtime Oracle home.

Create symbolic link go the directory

              $ cd /oracle/DBSID

            $  ln -s /oracle/DBSID/12102  /oracle//121

3. You adapt the environment of the adm user.

Log on as user adm and adapt the variables listed below in the .dbenv* files. 2. Set the ORACLE_HOME environment variable to new Oracle home,

$ export ORACLE_HOME=/oracle/SID/121

$ export ORACLE_BASE

Check the environment with:

$ env | grep ORACLE_HOME

$ env | grep ORACLE_BASE

$ env | grep PATH (this should no longer contain a reference to 112_64)

4. You adapt the environment of the ora user.

5. You start the database and listener process as user.

5.1. Log on as the Oracle database software owner ora, for example, oracle.

5.2. For user oracle, set the environment via oraenv or coraenv.

5.3. Start the listener and then start the database: lsnrctl start

sqlplus / as sysdba

SQL> startup

5.4. After the database upgrade, change the entry :/oracle//12102:N in /etc/oratab or /var/opt/oracle/oratab so that it now looks as follows: :/oracle//121:N

6. You perform post-upgrade checks.  Refer Note : SAP Note 1915315

1. Logon into the OS level with ora_sid .

$sqlplus / as sysdba

SQL> @?\rdbms\admin\utlu121s.sql

SQL> @post_upgrade_tasks.sql (if you have not already executed this with DBUA)

SQL> @post_upgrade_checks.sql

7. You perform post-upgrade tasks.

Login into os level with sapsid_adm 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

8. You update the Oracle Instant Client.

Create the new client directory:

$ mkdir -p /oracle/client/12x

$ cd /oracle/client/12x

unpack the client software:

$ SAPCAR -xvf  <oracle_client_DVD>/OCL/OCL12164.SAR

$ cd /oracle/client/12x ln -s instantclient_12102 instantclient

Create the symbolic link for BR*Tools 7.40: 1.

$ cd /oracle/client

mv 11x_64 11x_64_save

$ ln -s /oracle/client/12x /oracle/client/11x_64

9. Update BR*Tools.

You need to update the Brtool for more information see SAP Note : 2087004, 12741, and 1598594.

10. You back up the database.

Perform the full backup of database.

brbackup –u / –type offline –mode all –device disk –compress yes –language E

11. If required and not yet done, update the SAP executables.

          SAP kernel supported for Oracle 12c kernel should 7.21EXT

12. If not yet done, configure the Secure Storage in the File System (SSFS).


13. For systems with Java components – AS Java or AS ABAP+Java – update the JDBC driver references.

If your SAP software is version 7.0 or below, follows SAP Note 867976 to change the JDBC driver.     

If your SAP software is version 7.1 or higher, change the reference to the JDBC driver in the instance profile as described below.  Open the file with your text editor and search for property j2ee/dbdriver.

Replace the old driver location with the new one:



Where <Oracle_client_major_version> is the major version of the Oracle client that you are using after

this upgrade. So for example, if you are now using Oracle 12.1, set the new driver location to /oracle/


14. You restart the SAP system.

Stopsap r3

15. You configure the new features for Oracle Database 12c Release 1 (12.1). see SAP note : 1914631.

16. If not already done, migrate from software owner ora to software owner oracle, as described in Migrating to the Oracle Database Software Owner oracle.

17. You deinstall the old Oracle Home: SAP Note 1915314

18. You make sure that you have installed the required support packages for the SAP kernel supported for Oracle 12c. For AS Java or AS ABAP+Java, see also SAP Note 1777021.

Note : You may get some issue with Operating system like DBA groug or something please get tocuh with AIX team to fix the issue.

You must be Logged on to comment or reply to a post.
  • This is very similar to what I encountered recently doing this upgrade from 11G to 12C on AIX as well.  Pay close attention to the step above where the LISTENER is NOT migrated using DBUA.  That is an important step as you will have to uncheck the box.  If the listener gets migrated the installer changes the name of the LISTENER in the TNSNAMES.ORA and in the 12C Database.  The result is your R3trans -d will fail and Sidadm  running startsap will not start the Database or SAP.  Do yourself a favor and follow the steps above, migrate your LISTENER manually after the DBUA is complete.


    -Lexx N.

  • Hi brindavan ,

    thanks for valuable information ,

    have started as per your doc but i m stuck @ ./RUNINSTALLER -check

    my environment

    os – HP-ux

    oracle – 11.2 g to 12c

    even my runinstaller script updated patch level 59

    first error for Display variable is not this is ok i understand

    but second one Error /oracle/stage/12102/database/runInstaller not found

    even permission and ownership is ok

    plz guide me for the same.



    Ashish Chanekar


  • Hello Ashish,


    which GUI tool you are using vnc or Xmanager . Have you checked the Xclock is working after the display environment set.?



    Brindavan M