Skip to Content

This blog is step by step guide to upgrade oracle  10g to Oracle 11g. We cannot do patch upgrade kind of things since 11g is not a patch set of oracle. We have to install 11g home as a separate ORACLE_HOME in parallel to 10g Oracle Home and follow the steps to upgrade. For  the SAP we have to download Oracle 11g from SAP service market place. Download the latest version from SMP.

Pre-requisites :

  • Existing data base should be highest patch level  (oracle 10g  10.2.0.5.0) (OPatch not mandatory)
  • Check the Memory ,swap and Disk Space.
  • SYSAUX  and  SYSTEM table-space should have minimum 200 MB free space.
  • Check the oracle home directory’s  OS  level permission.
  • Stop the SAP Instances and services(don’t stop oracle services)
  • Need 5- to 7 GB free space on new oracle directory (where software going to install)


Installing the Oracle 11g Server Software


As of now Oracle 11.2.0.3 is Oracle database patch sets are full installations of the Oracle database software. For more information about identifying and installing the correct Oracle database software version, see SAP note 1431799.

Make sure that you have enough space for the Oracle inventory and that you have full access to the directories (inventory, installation location, temp directory). Otherwise, the Oracle Universal Installer cannot perform installation prerequisite checks.

Logon to system as <DBSID>ADM.

Start the Oracle Universal Installer (OUI) by double-clicking the file sapserver.cmd.

If a command prompt window appears, specify the drive letter of the local disk where you want to install the Oracle software,and the <DBSID>. The command prompt window only appears if you perform a new installation (under a different user), or if the ORACLE_HOME and <DBSID> are not set.

In the Oracle Universal Installer, enter the information as shown in the following table:

Window

Task

Download Software Updates

Select Skip software updates, and then Next.

Select Skip software updates, and then Next.Select Installation Option

Confirm the default selection Install database software only and then choose Next.

Grid Installation Options

Confirm the default selection Single instance database installation and then choose Next.

Select Product Languages

Confirm the default option English and then choose Next.

Select Database Edition

Confirm the default option Enterprise Edition and then choose Next.

Specify Installation Location

This window displays the value for ORACLE_BASE, which must be set in the environment to <drive_containing_oracle_home>:\oracle.

It also displays the value for ORACLE_HOME, which is\oracle\<DBSID>\1120<x> (where 1120<x> is the Oracle version number, for example, 11202 for Oracle 11.2.0.2, 11203 for Oracle 11.2.0.3, and so on).

Choose Next.

Perform Prerequisite Checks

This window checks if all the required system prerequisites for the installation of the database software have been met. If some of the checks are displayed as Failed, you can fix these problems and run the check again by choosing Check Again.

RECOMMENDATION

We strongly recommend you to make sure that there are no failed checks before starting the software installation.

Summary

Review the information displayed in this window and choose Finish or Install.

Install Product

This window shows the progress of the installation.

You can monitor the installation progress details in an additional window.

Finish

After the installation has finished successfully, choose Finish and close the Oracle Universal Installer.

Screen Shot of Installation:::

1.JPG2.JPG3.JPG4.JPG5.JPG6.JPG7.JPG

8.JPG9.JPG

Installing Required Patches ( not necessary )

After the database software installation, you need to install all required Oracle database patches, which on Windows include one patch collections and one or more additional (generic) patches.

For Oracle 11.2.0.3, check SAP Note 1631931 for the patches to be installed.

You can download the patches from:http://service.sap.com/oracle-downloadOracle 11.2.0.<x>

Prerequisites

Use an up-to-date version of OPatch to install the patches. Check SAP Note 839182 for instructions on how to use OPatch.

Copying and Adapting the SQL*Net Files

  • After the database software installation, you must copy and modify the old SQL*Net files, that is, listener.ora, sqlnet.ora, and tnsnames.ora.(from old 10g oracle home)
  • Log on as user <dbsid>adm.
  • copy <old_Oracle_home>/database/init<SID>.sap to <new_Oracle_home>/database/ init<SID>.sap
  • copy <old_Oracle_home>/database/init<SID>.utl to <new_Oracle_home>/database/init<SID>.utl
  • Copy the SQL*Net parameter files from the directory <old_ORACLE_HOME>\network\admin to the directory <new_ORACLE_HOME>\network\admin.
  • Edit the TNSNAME.ora & listener.ora add the new oracle home path <new_ORACLE_HOME>\network\admin directory.

       Identify the parameter ORACLE_HOME that belongs to the database you want to upgrade (SID_NAME in section SID_LIST) 

  • If not available, add the following entry to the file listener.ora:ADR_BASE_<listener_name> = <full_path_to_saptrace_directory>

Note that this is the same value as set in the database profile parameter diagnostic_dest.

Since your database is still running in the old environment, do not start the listener with the new listener.ora file at this point.

Backing Up the Oracle Database

You must have a complete and usable database backup otherwise you might lose data

Procedure

  1. Create a complete database and operating system backup, and back up any archive logs from Oracle 10g.
  1. Check that the backup is usable. If for any reason you have problems during the upgrade you must be able to restore the database from this backup.

Changing the Environment for User <dbsid>adm


  • ORACLE_HOME( map to new oracle home)
  • TNS_ADMIN (if it exists)

EXAMPLE

Rrename ORACLE_HOME into ORACLE_HOME_before_upgrade, and TNS_ADMIN into TNS_ADMIN_before_upgrade.

Run the Pre-upgrade script…. one by one as below…


Note 1431793 – Oracle 11.2.0: Upgrade Scripts

=============================================

A detailled description and instructions how to use the scripts can be found in SAP note 1431793.

https://service.sap.com/sap/support/notes/1431793


pre.JPG

create_restore_point.sql

pre_upgrade_checks.sql

pre_upgrade_status.sql

pre_upgrade_tasks.sql

utlu112i_sap.sql

10.JPG11.JPG

pree.JPG

Performing the Database Upgrade

  • To upgrade the database, use the Oracle Database Upgrade Assistant (DBUA).
  • StartAll ProgramsOracle – <NEW_ORACLE_HOME_NAME>Configuration and Migration ToolsDatabase Upgrade Assistant

Note:

     Note that if you use this method, you do not automatically run the SAP-specific DBUA upgrade scripts, and you have to run them after the upgrade      manually.

  • If not yet stopped, stop the SAP system.
  • Do not stop the database instance. The database instance must be running in the current (old) environment.
  • Change the registry entry of ORA_<DBSID>_AUTOSTART by entering the command: <new_Oracle_Home>\bin\oradim -edit –sid <dbsid> –startmode manual  Ignore the error message: Unable to start service, OS Error 1056.
  • Alternatively, use regedit.exe to change the registry key to value FALSE. The registry key is available at HKLM:\Sofware\Oracle\KEY_<DBSID>11203

DBUA steps:

SCREEN

Input

DBUA: Welcome

Start DUBA from 11g  home >>Choose Next.

DBUA: Select Database

1.

Select the database that you want to upgrade.

2.

Choose Next.

The DBUA analyzes the database to be upgraded and performs pre-upgrade checks.

3.

If the DBUA warns you of issues that need to be fixed before the upgrade, you need to analyze and act on these warnings.

The most common warning or information messages are as follows:=W�Q& Database is using an old timezone file version

Upgrade of TSTZ data is done automatically if the DBUA was started using dbua.sap.ps1.

Database contains schemas with stale optimizer statistics

See SAP Note 1431793, section 4. Running the Pre-Upgrade Scripts.Database contains INVALID objects prior to upgrade

See SAP Note 1431793, section 4. Running the Pre-Upgrade Scripts.

If there is not enough space for the SYSTEM tablespace, increase the space.˘EóÈv°

If you are prompted to resize the rollback segment SYSTEM, choose Continue.

4.Choose Yes to continue with the upgrade.

DBUA: Upgrade Options

The following options are available:

Recompile invalid objects at the end of the upgrade

Leave this selection unchanged.

The option lets you choose whether the DBUA has to automatically recompile all PL/SQL modules after the upgrade. If the database server has multiple CPUs, the DBUA automatically proposes the number of parallel processes to be used for the recompilation.

Backup database

Since you have already performed the Oracle database backup [page 23], you do not need to select this option.

Choose Next.

DBUA: Move Database Files

Leave the default setting Do Not Move Database Files as Part of Upgrade and choose Next.

DBUA: Recovery and Diagnostic Location

1.Do not select Specify Flash Recovery Area.

2.If you opened the DBUA with the Start menu, in the Diagnostic Destination field you have to specify the location of the saptrace directory using the Browse button.

3.Choose Next.

DBUA: Management Options

Deselect Configure the Database with Enterprise Manager, if selected, and choose Next.

DBUA: Summary

Review the summary of changes to be made.

This includes the warnings that you ignored or did not fix, components to be upgraded, parameters to be added, removed, and changed after the upgrade.

Choose Back to make any final adjustments, if required. Otherwise, leave the default settings and choose Finish to start the upgrade.

The upgrade process itself runs for some time, depending mainly on the size of the database and the capacity of the hardware.

You can ignore the warning ORA-32004 obsolete or deprecated parameter(s) specified for RDBMS instance.

When the DBUA has completed successfully, the results of the

Screen shot of DBUA

a1.JPGa2.JPGa3.JPGa4.JPGa5.JPGa6.JPGa7.JPG

a8.JPG

If you started the DBUA from the Start menu, you must perform additional steps to perform the post-upgrade script (see below).

Additional Steps When Starting the DBUA from the Start Menu

If you started the DBUA from the Start menu, you have to check the upgraded database and perform the post-upgrade script manually.

To do this perform the following steps of SAP note 1431793:

“6.1 Checking the upgraded database ”

“6.2 Running post-upgrade scripts manually ”



Post-Upgrade Steps

  1. You set the user environment variables
  2. You create the Oracle TNSListener service 
  3. You change the registry value of Oracle Autostart 
  4. You check the start up type of the Oracle services
  5. You perform post-upgrade tasks 
  6. You delete the old Oracle software

After the Oracle database upgrade, you need to perform the steps described here.


You set the user environment variable.


       In the user environment and system environment <DBSID>adm, check the PATH variable and, if required, remove all parts referring to the old Oracle                 version. 

          When you modify the user environment, you must be logged on as the corresponding <DBSID>adm user.

  • In the user environment of <DBSID>adm, set the ORACLE_HOME variable to the correct value for Oracle 11g, for example to: <DRIVE>:\ORACLE\<DBSID>\11203.
  • Copy tnsnames.ora and sqlnet.ora from %ORACLE_HOME%\network\admin to \\<sapglobalhost>\sapmnt\<DBSID>\SYS\profile\oracle.

       (This information is required for all ABAP application servers you install on a separate host to find the correct location of these files.) 

          Set TNS_ADMIN on all ABAP application servers.

  • Log off and log on again to activate the environment changes in your user session.


Creating the Oracle TNSListener Service

  • Stop the old Oracle listener before you create the Oracle TNSListener Service.( from ms service or command prompt: LSNRCTL STOP

          Create New listener service use command prompt or run commad:

          <complete_path_to_new_Oracle_Home>\bin\lsnrctl start

          This will start the listener from the new Oracle home. As the listener service does not yet exist, you will get the following error message: Failed to           open service <Oracle<SID>11202TNSListener>, error 1060. Then the service will be created and started.


lsn.JPG

li.JPG



Changing the Registry Value of Oracle Autostart

Change the registry value of ORA_<DBSID>_AUTOSTART. Open a command prompt and enter the following command:<new_Oracle_Home>\bin\oradim -edit -sid <dbsid> -startmode manual

Ignore the error message: Unable to start service, OS Error 1056.

Alternatively, use regedit.exe to change the registry key to value FALSE. The registry key is available at HKLM:\Sofware\Oracle\KEY_<DBSID>11202


Checking the Start Up Type of the Oracle Services


        Start the Oracle services (Database and Listener), if not yet started. 

Also, if not yet started, start the Distributed Transaction Coordinator Service.

In a standard configuration, set the startup type of OracleService<DBSID> and Oracle<ORACLE_HOME_NAME>TNSListener to automatic to ensure that they are automatically restarted after booting.

Performing Post-Upgrade Tasks (Follow the SAP NOTE 1431793)

Example :Open a command prompt and change to the directory <new_oracle_home>\sap\ora_upgrade\post_ugprade.

From this directory start sqlplus.exe and enter the following commands:SQL>connect / as sysdbaSQL>@post_upgrade_status.sql

This provides an overview of the status of the upgraded database.


Run the below scripts one by one


post.JPG

  • Check the Oracle database parameters against SAP Note 1431798 and adjust them if necessary.

       You can find an automated script in SAP Note 1171650 to help you check whether your SAP system complies with the database parameter               recommendations at any given point in time. 

  • Update the Oracle database statistics with BRCONNECT as follows:

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

Deleting the Old Oracle Software

  • Do not delete the old software, if it still has to be accessed by another database instance running with this version.
  • Before you delete the old Oracle software, you can perform a backup of your database
  • To deinstall the Oracle 10.2 software, you use the Oracle Universal Installer (OUI) from older home.
  • To delete a service, open a command prompt and enter:sc delete <service_name>

Above Details will help only for the standalone SAP on Oracle upgrade . And I did the upgraded as per  above mentioned steps .For  Cluster environment   download the standard document from sap. Database Upgrade Guide



Thanks

Yoonus


Visit.. WrongCodes


To report this post you need to login first.

10 Comments

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

  1. Andy Silvey

    Hi Yoonus,

    nice article isn’t it high time for a similar article about moving from Oracle 11 to Oracle 12 ?

    Best regards,

    Andy.

    (0) 
    1. Fidel Vales

      Hello,

      the upgrade to 12c is supported from 10.2.0.5 but keep in mind that the the upgrade to 12 is different (similar but not equal) to this guide.

      I do not understand why the people do not bother checking the official SAP documentation for the upgrade. .

      Please check the 12c installation guide and the note 1914631 – Central Technical Note for Oracle Database 12c Release 1 (12.1)

      (0) 
      1. Yoonus Ch Post author

        @ Fidel

        People are lazy to read an essay, if somebody did it is in simple steps that would be an easy method to follow instead of reading essays….

        (0) 
  2. Yoonus Ch Post author

    Only Oracle Database 12c Release 1 (12.1.0.2) is supported for SAP. Release 12.1.0.1 is not supported for SAP.


    Additional Restriction for SAP NetWeaver AS-JAVA , For SAP products based on SAP NetWeaver 7.2x, 7.3x for AS-JAVA and AS-ABAP+JAVA (Java Stack and Double Stack) only Oracle Instant Client version 11.2.0.4 is currently supported. If you upgrade your Oracle Database to 12c or if you install a new SAP system with Oracle Database 12c, you must not upgrade to or install Oracle Instant Client version 12.1.0.2.

    (0) 
    1. Andy Silvey

      Hi Yoonus,

      for the benefit of all, please provide a link to the source of the information your have provided.

      I am also currently involved in this topic and the useful OSS Notes I have found so far are:

      1174136 – Oracle End of Support Dates

      2098258 – Oracle 11.2 extended support free of charge until JAN 31 2016

      2156885 – Troubleshooting Database Upgrade to Oracle Release 12.1.0.2

      1973557 – When will Oracle 12 be supported for Information Steward 4.x

      1171650 – Automated Oracle DB parameter check

      1975790 – When will Oracle 12 be supported for Data Services 4.x

      1777021 – J2EE  Introducing Support for Oracle 12

      1914631 – Central Technical Note for Oracle Database 12c Release 12.1

      1888485 – Database Parameter for 12.1.0.2

      2133079 – Oracle Database 12c Integration in SAP environment

      Since this discussion has moved onto 12c and this is a hot topic for a lot of companies, let’s try to consolidate the most useful information here, so that it can then be the basis for a blog on the subject of upgrading SAP environments to Oracle 12c.

      Best regards,

      Andy.

      (0) 
      1. Fidel Vales

        Hi

        all SAP-Oracle installation guides are in http://service.sap.com/instguides then

        => Database Upgrades

        ==> Oracle

        ===> Upgrade to Oracle Database 12c Release 1 (12.1): UNIX
        those guides also are valid for “new” installations

        On them you can also find the notes relevant (Chapter 1.2 SAP Notes for the Upgrade), around 20 notes, probably some of the ones you mentioned and others

        If you want to install RAC/ASM/Exadata/ODA then, in addition, you need the guides that can be found on the current site (http://scn.sap.com/community/oracle)

        (0) 

Leave a Reply