Skip to Content

                                                            Oracle 12c Upgrade

This document describes the process of executing Oracle 12c Database upgrades, from the source 11g.


In addition, this manual provides information about compatibility, upgrading applications, and important changes in the new Oracle Database release.



1 Preparations/Prerequisites Step’s

The following activities can be executed with the system up and running.

  1. The software Packages can be placed at a specific location as per your understanding. Like we have kept at the following location /net/hnfssap/sap/infra/install/ORACLE12
    1. Oracle Stage /net/hnfssap/sap/infra/install/ORACLE12/stage_12
    2. Oracle Client  12c à /net/hnfssap/sap/infra/install/ORACLE12/instantclient_12
    3. DBA Tools 7.40 (pl17) à /net/hnfssap/sap/infra/install/ORACLE12/brtools
    4. MOPatch à /net/hnfssap/sap/infra/install/ORACLE12/MOPatch
    5. OPatch à /net/hnfssap/sap/infra/install/ORACLE12/OPatch

    2. Request Unix team to create additional Logical Volume

    1. /dev/mapper/sap<sid>db-vol<nn>
    2. /oracle/<SID>12102
    3. 15 GB

   3. Create directory /etc/oracle and make it 777. It will avoid the issue faced during the oracle upgrade later on.

i1.JPG

     4. Check the free space in our HNFS stage. Minimum free space 10GB

    1.     #df -h |grep hnfssap:/sap/infra/Install

     5. Backup of current oracle_home and oraInventory (position to the proper source location)


            a.    #tar -cvf /net/hnfssap/sap/infra/install/ORACLE12/oraInventory.tar oraInventory

            b. #tar -cvf /net/hnfssap/sap/infra/install/ORACLE12/11204.tar 11204

     6. Create SPFILE for backup

    1. @sqlplus /as sysdba
    2. #create pfile from spfile;
    3. Save the new spfile: cp init<SID>.ora init<SID>.ora.orig

     7. Check the patch inventory, and save the extract to a txt file.

    1. #./opatch lsinventory

     8. Check the oraInst.loc file. Outcome expected is the correct  oraInventory Location

    1. #more /etc/oraInst.loc

     9. Prepare the export display. Open two sessions, one will be used with the Oracle 11g variables and the second one with the 12c Variables:

    1. Open exceed X11
    2. #xhost+
    3. #sudo su – ora<sid>
    4. #export DISPLAY=<your_ip>:0.0
    5. #xclock (to check if it works)

    10. Set the 12c Variables

        a.    export ORACLE_HOME=/opt/oracle/<SID>/product/12102

        b.    export ORACLE_HOME_SRC=/opt/oracle/<SID>/product/11204

        c.    export ORACLE_HOME_TGT=/opt/oracle/<SID>/product/12102

    11. Link the new stage located in HNFS. The Oracle 12c Stage contains the latest scripts for the RUNINSTALLER (Patch Level 059 – 02062015). Check                 OSS note 1915301 in case a new script is available

    1. #cd /oracle
    2. # ln –s /net/hnfssap/sap/infra/install/ORACLE12/stage_12 stage

    12. Launch the RunInstaller Check

    1. #cd /net/hnfssap/sap/infra/install/ORACLE12/stage_12/database/SAP
    2. #RUNINSTALLER –check
    3. Request Unix to fix the warning and install the missing packages

2 Installation of new Oracle_Home 12.1.0.2

  1. With the 12c Variables, launch the RUNINSTALLER


i2.JPG

Click Next

i3.JPG

Click Yes

i4.JPG

Select Install Database software, then click Next

i5.JPG

Select Single instance database installation, then click Next

i6.JPG

Select English —  Click Next


i7.JPG

Select the Database Edition then Click Next


i8.JPG

Hidden the <SID>


Select the correct Oracle Base and Oracle_Home locations, then click Next

i9.JPG

Ignore the WARNING and click YES


i10.JPG

Click Next


i11.JPG

If already checked with Unix and the warning are still there, click Ignore All then click Next


i12.JPG

Click Yes


i13.JPG

Check and then click Install


i14.JPG

i15.JPG

Run the script as suggested


i16.JPG

i17.JPG

Click on Close



3. Install the Sap Bundle Patch (still with variables 12c)

    1. a. Upgrade the MOPatch and OPatch executables
    2. b. Position the zip file in the MOPatch directory
    3. c. #./ mopatch.sh -v -s SAP12102P_1511-20012300.zip

Link Status:

  Link script “./link.hostname.sh” executed successfully


Orasid>


4.  Launch the pre_upgrade script from the new Oracle_Home 12c


a.       sqlplus / as sysdba @pre_upgrade_status.sql

i18.JPG

5. Launch the dbua.sh –q and check the warning (in this case, the display variables were not properly set)

User is — ora<SID>

i19.JPG


6. Launch the upgrade script dbua.sh


i20.JPG

Check if the DB is up and running, then click Next

i21.JPG

Select Upgrade Oracle Instance, then click Next



Prerequisite Checks will run automatically

i23.JPG


Click Next, hidden the <SID>


i24.JPG

Un-check and then click Next


i25.JPG

Un-check and then click Next, hidden the <SID>


i26.JPG

click Next, hidden the <SID>


i27.JPG

Select the own backup strategy then click Next, hidden the <SID>


i28.JPG

Check the details then click Finish


Hostname:/etc # ll |grep oracle

Drwxrwxrwx     2 root        root             4096     oracle

Hostname:/etc #

Refer to this link, if required-:

https://community.oracle.com/thread/3696552?start=0&tstart=0


                                                  Post Activities

1. Update the SQL*Net configuration files:

            a. Copy the listener.ora, sqlnet.ora and tnsnames.ora from the Oracle 11 to the 12c $ORACLE_HOME/network/admin

            b. Adjust the files with the new oracle12 locations

2. Check the symbolic link for the runtime Oracle home.

            a. # cd /oracle/<SID>

            b. # ln -s /oracle/DBSID/12102 121

3. Adapt the environment of the <sid>adm user.

            a. Log on as user adm and adapt the variables listed below in the .dbenv* files.

            b. Set the ORACLE_HOME environment variable to new Oracle home

4. Adapt the environment of the ora user.

5. Edit the /etc/oratab file including the following line:

     a. <SID>:/opt/oracle/<SID>/product/12102:N

6. Start the database and listener process as <ora>sid user.

7. Perform post-upgrade checks.  Refer Note : SAP Note 1915315

8. Perform post-upgrade tasks

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

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

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

9. Update the Oracle Instant Client.

     a. Copy the oracle client from the HNFS location

     b. #cd /oracle/client/12x

     c. #ln -s instantclient_12102 instantclient

10.  Update BR*Tools.

     a. Copy the executables from the HNFS location

11.  Backup the database.

12.  Unistall the old Oracle_Home 11g

       a. # ./runinstaller -deinstall -home <path_of_Oracle_home_to_be_deinstalled>


End of Document




To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply