44
5/22/2018 GuideUxOraUpgr112400-slidepdf.com http://slidepdf.com/reader/full/guide-ux-ora-upgr-112-400 1/44 Database Upgrade Guide Upgrade to Oracle Database 11g Release 2 (11.2): UNIX For Oracle Patch Set Release 11.2.0.4 Target Audience  ■ Technology Consultants  ■ System Administrators  ■ Database Administrators  ■ Developers CUSTOMER Document version: 4.00 – 2014-02-19

Guide Ux Ora Upgr 112 400

Embed Size (px)

DESCRIPTION

vn

Citation preview

  • Database Upgrade GuideUpgrade to Oracle Database 11g Release 2 (11.2): UNIXFor Oracle Patch Set Release 11.2.0.4

    Target Audience Technology Consultants System Administrators Database Administrators Developers

    CUSTOMERDocument version: 4.00 2014-02-19

  • Typographic Conventions

    Example Description Angle brackets indicate that you replace these words or characters with appropriate

    entries to make entries in the system, for example, Enter your .ExampleExample

    Arrows separating the parts of a navigation path, for example, menu options

    Example Emphasized words or expressionsExample Words or characters that you enter in the system exactly as they appear in the

    documentationhttp://www.sap.com Textual cross-references to an internet address/example Quicklinks added to the internet address of a homepage to enable quick access to specific

    content on the Web123456 Hyperlink to an SAP Note, for example, SAP Note 123456Example Words or characters quoted from the screen. These include field labels, screen titles,

    pushbutton labels, menu names, and menu options. Cross-references to other documentation or published works

    Example Output on the screen following a user action, for example, messages Source code or syntax quoted directly from a program File and directory names and their paths, names of variables and parameters, and

    names of installation, upgrade, and database toolsEXAMPLE Technical names of system objects. These include report names, program names,

    transaction codes, database table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE

    EXAMPLE Keys on the keyboard

    2/44 CUSTOMER 2014-02-19

  • Document History

    CAUTIONBefore you start the implementation, make sure you have the latest version of this document. You can find the latest version at the following location:http://service.sap.com/instguides Database Upgrades Oracle

    The following table provides an overview of the most important document changes.Version Date Description4.00 2014-02-19 Major update for Oracle Patch Set Release 11.2.0.43.02 2012-10-30 Minor corrections in chapter Updating the Oracle Installation Scripts3.01 2012-08-08 Various corrections3.00 2011-12-20 Major update for Oracle Patch Set Release 11.2.0.32.10 2011-09-16 Various corrections2.01 2011-05-19 Various corrections2.00 2011-04-14 Major update for Oracle Patch Set Release 11.2.0.21.14 2010-09-10 Chapter Changing the Location of the JDBC Driver added1.13 2010-08-25 Various corrections1.12 2010-08-03 Various corrections1.11 2010-06-15 Change to section Updating BR*Tools1.10 2010-06-09 Major update including upgrade from Oracle 9.2.0.81.01 2010-04-27 Various corrections1.00 2010-04-01 Initial Version

    2014-02-19 CUSTOMER 3/44

  • Table of Contents

    Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1 New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2 SAP Notes for the Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3 More Information on SAP Service Marketplace . . . . . . . . . . . . . . . . . . . . . . . . . 9

    Chapter 2 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.1 Checking the Original Version of Your Database . . . . . . . . . . . . . . . . . . . . . . . 112.2 Checking Hardware and Software Requirements . . . . . . . . . . . . . . . . . . . . . . . 122.3 Reviewing the Kernel Parameters and Shell Limits . . . . . . . . . . . . . . . . . . . . . . 122.4 Checking Additional Requirements for the Upgrade . . . . . . . . . . . . . . . . . . . . 122.5 Checking the SAP System Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    Chapter 3 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.1 Checking and Setting the DISPLAY Environment Variable . . . . . . . . . . . . . . . 153.2 Checking UNIX Users, Groups, and Authorizations . . . . . . . . . . . . . . . . . . . . 163.3 Checking the Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.4 Updating the SAP RUNINSTALLER Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.5 Checking the Software Installation Prerequisites . . . . . . . . . . . . . . . . . . . . . . . 183.6 Installation of Oracle Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.6.1 Checking and Setting the Environment Variables . . . . . . . . . . . . . . . . . . . . . . 193.6.2 Backing Up the Central Oracle Inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.6.3 Installing the Oracle Database Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.6.4 Installing the Required SAP Bundle Patch . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.7 Running the Pre-Upgrade Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    Chapter 4 Oracle Database Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.1 Backing Up the Oracle Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.2 Shutting Down the SAP System and Oracle Listener Process . . . . . . . . . . . . . . 274.3 Database Structure Upgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.3.1 Starting the Database Upgrade Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.4 Copying and Adapting the SQL*Net Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    4/44 CUSTOMER 2014-02-19

  • Chapter 5 Post-Upgrade Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.1 Finalizing the Environment of the ora User . . . . . . . . . . . . . . . . . . . . 335.2 Creating a Symbolic Link for Runtime Oracle Home . . . . . . . . . . . . . . . . . . . . 345.3 Checking the Upgraded Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.4 Updating BR*Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.5 Performing Post-Upgrade Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.6 Backing Up the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.7 Starting the Listener Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375.8 Deinstalling the Old Oracle Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375.9 Checking the Read Authorization of the adm User . . . . . . . . . . . . . 375.10 Updating the Oracle Instant Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385.11 Updating the JDBC Driver References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385.12 Changing the Environment for the adm user . . . . . . . . . . . . . . . . . . 395.13 Updating the SQL*Net Configuration Files for the adm and

    ora Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.14 Checking SAP Profile Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.15 Starting the SAP System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.16 Checking the National Character Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.17 Configuring the New Features for Oracle Database 11g Release 2

    (11.2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    2014-02-19 CUSTOMER 5/44

  • This page is left blank for documents that are printed on both sides.

  • 1 Introduction

    This documentation describes how to upgrade the Oracle database for the SAP system on the UNIX operating system: From source release Oracle Database 10g Release 2 (10.2.0.5), or Oracle Database 11g Release 2

    (11.2.0.2 or 11.2.0.3) To target release Oracle Database 11g Release 2 (11.2) (11.2.0.4)For support status of Oracle Database 10g Release 2, see SAP notes 1110995 and 1654734.This guide is suitable for both major release upgrades (for example, from Oracle 10.2.0.5 to Oracle 11.2.0.4) and for patch set upgrades (for example, from Oracle 11.2.0.2 to 11.2.0.4).

    NOTE If your source release is Oracle 9.2.0.8, see the database upgrade guide for target release Oracle

    11.2.0.3:Database Upgrade Guide: Upgrade to Oracle Database 11g Release 2 (11.2): UNIX, For Oracle Patch Set Release 11.2.0.2 and 11.2.0.3

    For support status of Oracle Database 10g Release 2, see SAP notes 1110995 and 1654734.

    This guide does not cover upgrades of Oracle databases with Real Application Clusters (RAC) Automatic Storage Management (ASM), or Exadata. For more information, see SAP Note 1798976.

    CAUTIONOracle 11.2 is only supported for SAP systems with a 640 EX2 kernel or higher.

    Implementation Considerations For more information about implementation considerations, including the most important SAP

    Notes for the upgrade, see Planning [page 11]. Be sure to read the relevant SAP Notes before beginning the upgrade. These notes contain the most

    recent information about the upgrade, as well as corrections to the documentation. You can find the most recent version of the SAP Notes at http://service.sap.com/notes

    You might find useful information for the upgrade in the following Oracle documentation: Oracle 11gR2 Upgrade Companion [ID 785351.1] Operating Systems Installation and Configuration Requirements Quick Reference (8.0.5 to 11.2) [ID 169706.1]

    You use the tools Oracle Universal Installer (OUI), MOPatch (Opatch), Oracle SQL*Plus, and Oracle Database Upgrade Assistant (DBUA) to perform the upgrade.

    1 Introduction

    2014-02-19 CUSTOMER 7/44

  • To make this documentation easier to read, only the location for 64-bit platforms is used. If your database runs on a 32-bit platform (Linux 32bit), replace as appropriate occurrences of 64 with 32. For example, replace 112_64 with 112_32.

    Naming ConventionsWe use for the database instance identifier and for the SAP system identifier. These can be different if your SAP system uses Multiple Components in One Database (MCOD).We use to refer to the Oracle database software owner. This can be either ora or oracle. The examples in this guide assume that the Oracle database software owner is ora.

    1.1 New FeaturesFor the complete list of new features of the Oracle Database 11g Release 2 (11.2), see the New Features documentation from Oracle and SAP Note 1431800.

    RECOMMENDATIONEspecially when you are performing a major release upgrade that is, when you upgrade from 10g to 11g we recommend that you check the most important new features in the Oracle documentation.

    You can access the complete Oracle documentation at the Oracle Technology Network (OTN) website at www.oracle.com/technology.

    More InformationConfiguring the New Features for Oracle Database 11g Release 2 (11.2) [page 41]

    1.2 SAP Notes for the UpgradeMake sure that you read the following SAP Notes:Number Title Remarks1431800 Oracle 11.2.0: Central Technical

    NoteProvides a starting point for information about Oracle 11g with multiple links to notes on Oracle 11g.

    1949451 Oracle 11.2.0: Database Upgrade to Release 11.2.0.4 (Quick Reference)

    Quick guide for experienced database administrators

    1454627 Additional Info / Corrections to Oracle 11g Upgrade Guide

    Required late-breaking information

    1431797 Oracle 11.2.0: Troubleshooting the Database Upgrade

    Describes database upgrade problems and solutions or workarounds

    1431793 Oracle 11.2.0 Upgrade Scripts Describes the shell and SQL upgrade scripts for 11.2.0

    1 Introduction1.1 New Features

    8/44 CUSTOMER 2014-02-19

  • Number Title Remarks1398634 Oracle Database 11g: Integration

    into the SAP environmentProvides information about integration of Oracle 11g products and options within SAP

    1431798 Oracle 11.2.0: Database Parameter Settings

    Provides information about Oracle initialization parameters that need to be reset to their default values or that need to be removed

    1431796 Oracle 11.2.0: Troubleshooting the Software Installation

    Describes software installation problems and solutions or workarounds

    1431799 Oracle 11.2.0: Current Patch Set Describes the current Oracle patch set1949250 Oracle 11.2.0: Patches / Patch

    collections for 11.2.0.4Lists the status of Oracle patches and bundle patches for 11.2.0.4

    1631931 Oracle 11.2.0: Patches / Patch collections for 11.2.0.3

    Lists the status of Oracle patches and bundle patches for 11.2.0.3

    1503709 Oracle 11.2.0: Patches / Patch collections for 11.2.0.2

    Lists the status of Oracle patches and bundle patches for 11.2.0.2

    1431794 Oracle 11.2.0: Instant Client Required for upgrading Oracle client software to Oracle 11g Release 2 (11.2)

    819829 Oracle Instant Client Installation and Configuration on Unix

    Describes the Oracle Instant Client Installation and Configuration

    850306 Oracle Critical Patch Update Program

    Describes the current Oracle security fixes

    134592 Importing the SAPDBA role (sapdba_role.sql)

    Describes how to update the SAPDBA role after the upgrade

    834917 Oracle Database 10g: New database role SAPCONN

    Describes the new SAPCONN role, which replaces the native CONNECT role from Oracle

    839182 Using OPatch to install Oracle patches

    Describes how to use OPatch with Oracle Windows only

    1027012 MOPatch Install Multiple Oracle Patches in One Run

    Describes how to use MOPatch with Oracle UNIX only

    1430669 BR*Tools Support for Oracle 11g Describes the support offered by BR*Tools for Oracle 11g1519872 SAP Database User Profile

    SAPUPROFDescribes the configuration of an SAP installation with the SAP-specific database user profile SAPUPROF

    1524205 Oracle 11.2.0: Software Installation Contains the newest installation scripts1525025 Oracle Software Deinstallation Describes how to deinstall the Oracle 11g Release 2 (11.2)

    software1521371 Oracle 11.2.0: Setting of

    ORACLE_BASE in SAP Environments

    Describes how to set ORACLE_BASE in an SAP environment

    1798976 11gR2 Uprade Companion for Oracle RAC and Oracle ASM

    Describes the upgrade procedure for an Oracle RAC installation or an Oracle ASM installation from Oracle 11gR2 on generic Unix/Linux platforms.

    1.3 More Information on SAP Service MarketplaceYou can find more information as following on SAP Service Marketplace:

    1 Introduction1.3 More Information on SAP Service Marketplace

    2014-02-19 CUSTOMER 9/44

  • Description Internet Address TitleSAP Notes http://service.sap.com/notes NoneOracle Database Administration

    www.sdn.sap.com/irj/sdn /ora SAP ON ORACLE KNOWLEDGE CENTER SAP Documentation

    SAP Database Guide: Oracle

    SAP Software Distribution Center

    http://service.sap.com/swdc None

    Oracle Database Upgrade Guide that is, the guide you are now reading

    http://service.sap.com /instguides Database Upgrades

    Oracle

    Upgrade to Oracle Database : UNIX

    Oracle download area for patches and software

    https://service.sap.com/oracle

    Oracle Download Area

    1 Introduction1.3 More Information on SAP Service Marketplace

    10/44 CUSTOMER 2014-02-19

  • 2 Planning

    RECOMMENDATIONBefore the production upgrade, make sure that you perform a test upgrade on your backup system.

    1. You check the original version of your database [page 11].2. You check the hardware and software requirements [page 12].3. You review the kernel parameters and shell limits [page 12].4. You check additional requirements for the upgrade [page 12].5. You check the SAP System prerequisites [page 13].

    2.1 Checking the Original Version of Your DatabaseYou can check the original version of the database you want to upgrade and, if necessary, obtain more information. The database version is also checked later during the pre-upgrade phase.

    PrerequisitesIn the following special cases you need to obtain more information: If you are upgrading from Oracle 10.2 to Oracle Database 11g Release 2 (11.2) in manual mode (in

    this guide we only describe the database upgrade using the DBUA) If the source database runs Oracle 10.2 with patch set lower than 10.2.0.5, you need to first upgrade

    the source database to at least patch set 10.2.0.5.

    Process1. To check the original version of your database, do one of the following from the environment of

    the source database: Enter the following command:

    sqlplus version Enter the following commands:

    sqlplus / as sysdbaSQL> select version from v$instance;

    2. For more information in the special cases mentioned above, see the documentation for the Oracle Database 11g Release 2 (11.2) upgrade at the Oracle Technology Network (OTN) website.

    2 Planning2.1 Checking the Original Version of Your Database

    2014-02-19 CUSTOMER 11/44

  • 2.2 Checking Hardware and Software RequirementsProcedureYou need to check that you meet the hardware and software requirements for running the new Oracle release. The complete list of hardware and software requirements for every platform is included in the Oracle documentation. The hardware and software requirements are also checked in detail during the software installation phase.You can access the complete Oracle documentation as a member of the Oracle Technology Network (OTN).

    2.3 Reviewing the Kernel Parameters and Shell LimitsYou need to review the Oracle-recommended kernel parameters and shell limits for your operating system with Oracle Database 11g Release 2 (11.2). The kernel parameters and shell limits are also checked in detail during the software installation phase.These are only recommendations from Oracle for optimizing the system performance in production environments. If the recommended settings are not suitable for your system you must tune the kernel parameters accordingly.

    ProcedureObtain the recommended shell limits and kernel parameters from the relevant Oracle database installation guide for your operating system, which you can find at:www.oracle.com/technology/documentationSelect the appropriate documentation for Oracle Database 11g Release 2 (11.2).

    2.4 Checking Additional Requirements for the UpgradeYou need to check the additional requirements for the Oracle database upgrade as described in this section.

    Procedure1. Make sure you have read the SAP Notes for the upgrade [page 8], which you can find at

    http://service.sap.com/notesDownload the recommended documents from My Oracle Support (formerly Oracle Metalink) at https://support.oracle.com. For access to My Oracle Support, see SAP Note 758563.

    2. Oracle 11.2 is only released and certified for SAP products running with SAP BASIS 640 and above, and SAP kernel release 640_EX2 and above. To check for your application or product, see the Product Availability Matrix (PAM) at http://service.sap.com/pam.

    2 Planning2.2 Checking Hardware and Software Requirements

    12/44 CUSTOMER 2014-02-19

  • 3. To upgrade from a remote PC, you need X-Windows software on the PC, as described in SAP Note 432861.

    RECOMMENDATIONIn some situations the OUI and DBUA screens are not displayed correctly when started remotely. In such cases we recommend you to start the OUI and the DBUA directly from the console.

    4. Download the Oracle Database 11g Release 2 (11.2) installation guide for your operating system from the Oracle Technology Network (OTN).You need this document to review the hardware and software requirements and to configure the kernel parameters and shell limits.

    RECOMMENDATIONIf you have access to My Oracle Support, we recommend that you read document 169706.1. This document provides information on all operating system prerequisites and is regularly updated.

    5. Download the Oracle Database 11g Release 2 (11.2) software including the 11.2.0.4 patch sets and required patches or patch collection.The SAP Note with the list of patches is referenced in SAP Note 1431800.You can download the software and patches from:http://service.sap.com/oracle

    CAUTIONThe patches listed in the SAP Note referenced in SAP Note 1431800 are mandatory. To avoid severe database problems, make sure that you install all these patches.

    6. Download the latest version of the Oracle 11.2 Instant Client software from:http://service.sap.com/oracle

    7. Download the latest version of the DBATOOLS (BR*Tools) to be used immediately after the database upgrade from:http://service.sap.com/swdcBR*Tools supports the Oracle Database 11g Release 2 (11.2), as of release 7.10 (patch level 30).or Release 7.20 (patch level 1) . For more information, see SAP Note 1430669.

    2.5 Checking the SAP System PrerequisitesProcedure1. For SAP systems 7.XX when you are performing a major release upgrade, apply SAP Notes

    1416108, 1414733, and 1433301 if you are running any of the following support packages: SAP_BASIS 7.00 SP21 SAP_BASIS 7.01 SP06 SAP_BASIS 7.02 SP02

    2 Planning2.5 Checking the SAP System Prerequisites

    2014-02-19 CUSTOMER 13/44

  • SAP_BASIS 7.10 SP10 SAP_BASIS 7.11 SP05 SAP_BASIS 7.20 SP02This resolves an error in an ABAP program that causes it to report problems during the consistency checks within transaction SE14. This error is seen only after the database has been upgraded to Oracle 11.2.The error is fixed in later support packages.

    2. If your SAP system is SAP BASIS 7xx, apply the advanced correction from SAP Note 1417124This correction resolves an Oracle issue that results in an ABAP short dump during statistics updates.

    3. If your SAP system uses SAP Kernel 711, you need to use DBSL (dboraslib.so) patch level 81 or higher.For more information, see SAP Note 1456323.

    2 Planning2.5 Checking the SAP System Prerequisites

    14/44 CUSTOMER 2014-02-19

  • 3 Preparation

    You have to complete the following preparations:1. You check and, if necessary, set the DISPLAY environment variable [page 15].2. You check the UNIX users, groups, and authorizations [page 16].3. You check the directory structure [page 16].4. You update the Oracle installation scripts [page 18].5. You check the software installation prerequisites [page 18].6. You install the database software [page 19].7. If your source database is Oracle 10.2.0.4, you run the pre-upgrade scripts [page 24].

    3.1 Checking and Setting the DISPLAY Environment VariableYou need to check and, if necessary, set the DISPLAY environment variable of the Oracle database software owner, user .

    CAUTIONDo not make the changes to the environment permanent while the old database is still running. You make them permanent in the database structure upgrade. We recommend you to back up the old environment files before making the changes permanent.

    PrerequisitesThe setting of the DISPLAY environment variable is described in SAP Note 432861.

    Procedure1. Set the DISPLAY environment variable to :0.0:

    Shell CommandBourne shell (sh) DISPLAY=:0.0

    export DISPLAYC shell (csh) setenv DISPLAY :0.0Korn shell (ksh) export DISPLAY=:0.0

    NOTE is the host on which you want to display the GUI of the Oracle Universal Installer (OUI).

    2. To make sure that the OUI screen can be displayed correctly on your system, you might have to start an X terminal (xterm) session and run the command:

    3 Preparation3.1 Checking and Setting the DISPLAY Environment Variable

    2014-02-19 CUSTOMER 15/44

  • $ xhost +

    3.2 Checking UNIX Users, Groups, and AuthorizationsYou need to check that the Oracle database software owner, user , has write authorization for the $ORACLE_BASE directory, since you perform the database installation as this user. For information about $ORACLE_BASE, see SAP Note 1521371.

    ProcedureEnter the following commands:echo $ORACLE_BASEtouch $ORACLE_BASE/write_testrm $ORACLE_BASE/write_testIf the Oracle database software owner, user ora, does not have write authorization, log on to your system with the user root and enter the command:chgrp dba $ORACLE_BASEchmod 775 $ORACLE_BASECheck if you are able to start an XTERM as the Oracle user since this is the user who starts the OUI.

    3.3 Checking the Directory StructureYou need to verify the availability and correctness of the following Oracle directories: Oracle software stage directory Oracle inventory directoryProcedure1. Check the Oracle stage directory, usually called /oracle/stage.

    If this directory does not exist, create it manually. If it already exists it might contain software stages from previous installations or upgrades.1. For the upgrade to Oracle Database 11g Release 2 (11.2.0.4), create the staging directory as

    follows:/oracle/stage/11204mkdir -p /oracle/stage/11204

    2. Ensure that the stage directories contain enough freespace prior to extraction of the SAR files. For the database upgrade, only the software contained within the component database is used.The Oracle Database DVD contains a total of six or seven SAR files (depending on the platform), which include the various Oracle 11.2 components such as database, client, grid, gateways, and so on.

    3 Preparation3.2 Checking UNIX Users, Groups, and Authorizations

    16/44 CUSTOMER 2014-02-19

  • If there is not enough space, you can delete previous stage directories.3. When the RDBMS CDs have been mounted, use the SAP tool SAPCAR to extract all the

    RDBMS CDs to /oracle/stage/11204 as user .EXAMPLEFor example, the following commands extract the database software (on DVDs 1 and 2):SAPCAR xvf OR111264.SARSAPCAR xvf OR211264.SAR

    After you have finished the extraction of all the RDBMS CDs, the following subdirectories exist under /oracle/stage/11204: database client grid examples gateways deinstallNOTEFor a single-instance database upgrade, you only need to extract the database software. The database components are packed in the files OR111264.SAR and OR211264.SAR. If you only use a single instance database, these 2 SAR files alone are sufficient. In this case, you do not need to extract any other SAR files.

    2. Check the Oracle inventory directory.The Oracle inventory directory maintains the inventory of all Oracle software installed on the system. The path to the Oracle inventory directory is mentioned in the Oracle inventory pointer file oraInst.loc. For more information, see http://docs.oracle.com/cd/E11882_01/em.112/e12255/oui2_manage_oracle_homes.htm.

    3. Before starting the installation of the new Oracle software on the database host, make sure that the file oraInst.loc is present in either the directory /etc or directory /var/opt/oracle and check that it has the following entries: For user oracle:

    inventory_loc= inst_group=oinstall

    For user ora: inventory_loc= inst_group=dba

    If the Oracle Universal Installer has already been run on this host, make sure that the variable inventory_loc in the file oraInst.loc points to the location where the Oracle inventory is located. If this is the first time that the OUI has been executed on this host, enter the location where you want the inventory log files to be written to.

    3 Preparation3.3 Checking the Directory Structure

    2014-02-19 CUSTOMER 17/44

  • By default in Oracle 11.2, the inventory is created in /oracle/oraInventory.If this is the first installation of Oracle database software on the host and the oraInst.loc file does not exist, you must create it at the end of the installation by running the orainstRoot.sh script as super user from the location.

    3.4 Updating the SAP RUNINSTALLER ScriptsIf a newer version is available, we recommend that you update the Oracle Installation scripts, which are attached to SAP Note 1524205. From there you can download the relevant package for your release. After you have extracted the Oracle software to the staging area, you need to update the installation scripts.

    PrerequisitesThe SAP-specific installation scripts RUNINSTALLER, RUNINSTALLER_CHECK, and 11ginstall.sh are located in directory SAP in the Oracle database software stage.

    ProcedureUpdating the Installation Scripts1. Check SAP Note 1524205 to see if there is a more recent version of the installation scripts than on

    the installation medium.2. If required, download the new version attached to the SAP Note, following the instructions there.

    3.5 Checking the Software Installation PrerequisitesYou must check the prerequisites for the Oracle Universal Installer (OUI).

    PrerequisitesMake sure that the DISPLAY environment variable is set correctly, as described in Checking and Setting the DISPLAY Environment Variable [page 15].

    Procedure1. Log on as the Oracle database software owner, user .2. Change directory:

    cd /oracle/stage/11204/database3. Only valid for: AIX |

    On AIX, call the script rootpre.sh as user root:./rootpre.shEnd of: AIX |

    4. Execute the following commands to check operating system requirements (release, patches, kernel parameters):

    3 Preparation3.4 Updating the SAP RUNINSTALLER Scripts

    18/44 CUSTOMER 2014-02-19

  • cd SAP./RUNINSTALLER check

    5. Apply missing OS patches and OS packages and set OS kernel parameters as recommended by the OUI.

    3.6 Installation of Oracle Database SoftwareAs part of preparations, you install the Oracle 11.2 software.

    NOTEYou can install the Oracle 11.2.0.4 database software into a new Oracle Home while the SAP system and the database are still running.

    Starting with the Oracle Database Release 11.2.0.2, Oracle Database patch sets are full installations of the Oracle Database software. This means that you do not need to install Oracle Database 11g Release 2 (11.2.0.1) base release before installing the new patch set release. You can install the new database software while the SAP system is running with a lower patch set version.

    Process Flow1. You check and set the environment variables [page 19].2. You back up the central Oracle inventory [page 21].3. You run the Oracle Universal Installer [page 21].4. You install the required SAP bundle patch [page 23].

    3.6.1 Checking and Setting the Environment VariablesTo install the database software, you need to check and set the environment variables of the Oracle database software owner, user , because this user installs the Oracle software.

    NOTEFor more information about changes to the environment of the SAP user adm, see Changing the Environment for the adm User [page 39].

    PrerequisitesMake sure that you set the environment variables as described below for the duration of this session only.

    CAUTIONDo not make the changes to the environment permanent while the old database is still running. You make them permanent in the database structure upgrade. We recommend you to back up the old environment files before making the changes permanent.

    3 Preparation3.6 Installation of Oracle Database Software

    2014-02-19 CUSTOMER 19/44

  • Procedure1. Make sure the following environment variables are not set:

    TWO_TASK ORA_NLS ORA_NLS32 ORA_NLS33 ORA_NLS10

    2. Make sure that the following environment variables are set as described:Environment Variable ValueDISPLAY For more information, see Checking and Setting the DISPLAY Environment

    Variable [page 15].ORACLE_BASE Value for Oracle base.

    The SAP default for single-instance installations is /oracleFor more information, see SAP Note 1521371.

    ORACLE_SID ORACLE_HOME Make sure that it is set to the value of the current runtime Oracle

    home, OHRDBMS.EXAMPLE When upgrading from 10.2.0.5 to 11.2.0.4:

    /oracle//102_64 When upgrading from 11.2.0.X to 11.2.0.4:

    /oracle//112_64NLS_LANG One of the following values:

    AMERICAN_AMERICA.WE8DECAMERICAN_AMERICA.UTF8If your database still runs with the character set US7ASCII, we strongly recommend moving it to WE8DEC or UTF8 before the upgrade.For more information about WE8DEC, see SAP Note 102402.

    SAPDATA_HOME /oracle/Only valid for: AIX |LIBPATHEnd of: AIX |

    Only valid for: AIX |$ORACLE_HOME/lib:$LIBPATHEnd of: AIX |

    Only valid for: HP Tru64 UNIX;Linux;Solaris |LD_LIBRARY_PATHEnd of: HP Tru64 UNIX;Linux;Solaris |

    Only valid for: HP Tru64 UNIX;Linux;Solaris |$ORACLE_HOME/lib:$LD_LIBRARY_PATHEnd of: HP Tru64 UNIX;Linux;Solaris |

    Only valid for: HP-UX |SHLIB_PATHEnd of: HP-UX |

    Only valid for: HP-UX |$ORACLE_HOME/lib:$SHLIB_PATHEnd of: HP-UX |

    PATH PATH includes $ORACLE_HOME/bin of the current active ORACLE_HOME. This means that you have to adapt PATH when ORACLE_HOME is changed. PATH can only include one $ORACLE_HOME/bin.When you perform a major upgrade from 10.2 to 11.2, you need to modify PATH after the upgrade. When you perform a patch set

    3 Preparation3.6 Installation of Oracle Database Software

    20/44 CUSTOMER 2014-02-19

  • Environment Variable Valueupgrade from 11.2 -> 11.2, the run-time Oracle home path does not change and therefore no change in PATH is required.

    3. Check if the temporary directory (usually /tmp) has at least 1024 MB of free space. If not, set up the TEMP or TMPDIR environment variables to specify a temporary directory on the filesystem.

    RECOMMENDATIONYou can check the correctness of the new environment with the UNIX env command.

    3.6.2 Backing Up the Central Oracle InventoryBefore you install the new Oracle database patch set software, you need to back up the central Oracle inventory.

    Procedure1. If the Oracle inventory exists, check its location by looking at the entry in one of the following

    files: HP-UX, Solaris: /var/opt/oracle/oraInst.loc AIX, Linux: /etc/oraInst.locThe location is shown as follows:inventory_loc=For more information about which platform uses which location, see http://docs.oracle.com/cd/E11882_01/em.112/e12255/oui2_manage_oracle_homes.htm.

    2. Make a backup of your existing Oracle inventory before you start the Oracle Database 11g Release 2 (11.2) software installation by entering the following commands:cd cd ..cp -r oraInventory oraInventory..SAVE

    3.6.3 Installing the Oracle Database SoftwareStarting with the first patch set for Oracle Database 11g Release 2 (11.2.0.2), Oracle Database patch sets are full installations of the Oracle database software. You only need to install the current Oracle database patch set. For more information about the current patch set, see SAP note 1431799.For more information about how to install Oracle database 11.2 software, see SAP note 1524205.

    CAUTIONBefore starting to install the Oracle software, make sure that you have updated the installation scripts as described in Updating the Oracle Installation Scripts [page 18].

    3 Preparation3.6 Installation of Oracle Database Software

    2014-02-19 CUSTOMER 21/44

  • Procedure1. Log on as the Oracle database software owner .

    If you are already logged on as user root, you can switch to the Oracle database software owner, user , by entering the following command:su

    2. Change to the stage directory:cd /oracle/stage/11204/database/SAP

    3. Make sure that the DISPLAY environment variable is set to :0.0, where is the host on which you want to display the GUI of the Oracle Universal Installer (OUI).Shell Used CommandBourne shell (sh) DISPLAY=:0.0

    export DISPLAYC shell (csh) setenv DISPLAY :0.0Korn shell (ksh) export DISPLAY=:0.0

    4. Start the OUI with the Oracle database software owner, user , as follows:./RUNINSTALLERFor silent operation, enter this command:./RUNINSTALLER -silentFor more information on further options, see SAP Note 1524205.

    5. Respond to the OUI as follows:Prompt or Condition ActionConfigure Security Updates Do not select the checkbox.

    The runInstaller issues a warning.Choose OK and then Next.

    Select Installation Option Confirm the default selections by choosing Next.Grid Installation Options Confirm the default selection Single Instance

    Installation and then choose Next.Select Product Language 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 screen displays the value for ORACLE_BASE which

    is set in the environment. It also displays the value for ORACLE_HOME, which should be /oracle/DBSID/.See SAP Note 1521371 to set ORACLE_BASE for your configuration.Select this option and then Next.

    Privileged OS Groups This screen displays the operating system groups for the DBA and the operator. Normally, these are dba and oper.

    3 Preparation3.6 Installation of Oracle Database Software

    22/44 CUSTOMER 2014-02-19

  • Prompt or Condition ActionPerform Prerequisite Checks This screen checks if all the required system

    prerequisites for installation of the database software have been met. If some of the checks are displayed as Failed, you can fix these problems (either by installing the missing patches or configuring the kernel parameters) and run the check again by choosing Check Again.

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

    Summary Review the information displayed on this screen and choose Finish.

    Finish Finish the software installation by executing the root.sh script as the root user from another session.

    6. To exit the OUI, choose Exit and confirm the dialog box that appears.

    ResultThe patch set software is now installed in the installation Oracle home. This is referred to for example, in SAP Notes as .

    EXAMPLE/oracle/11204

    3.6.4 Installing the Required SAP Bundle PatchAfter the Oracle database software installation, you need to install the required SAP bundle patch.

    NOTEYou must install the SAP bundle patch using the Oracle tool MOPatch, which you can find at SAP Note 1027012.You only need to install the latest SAP bundle patch because these patches are cumulative.

    The SAP bundle patch also delivers a set of upgrade scripts that automate most of the pre-upgrade and post-upgrade tasks. For more information, see SAP Note 1431793.

    PrerequisitesCheck SAP Note 1431800 to find a cross-reference to the current SAP Note with the list of required patches to be installed.

    Procedure1. Log on at the operating system level as the Oracle database software owner, user

    .

    3 Preparation3.6 Installation of Oracle Database Software

    2014-02-19 CUSTOMER 23/44

  • 2. Install the SAP bundle patch according to the instructions in the SAP bundle patch README file.

    3.7 Running the Pre-Upgrade ScriptsYou run the Oracle pre-upgrade scripts, which automatically perform various tasks and checks on your database. See SAP Note 1431793.This section only applies if your source database is Oracle 10.2.0.5, 11.2.0.2, or 11.2.0.3.The scripts do the following on your pre-upgrade database: Provide information on the database Suggest any changes that you need to make to the database before you start the upgrade Perform some of the pre-upgrade tasks on the database

    NOTEYou always execute these scripts as the Oracle database software owner, user , connected to the database as sysdba in the pre-upgrade environment of the database to be upgraded.

    PrerequisitesThe directory where the upgrade scripts are installed is called ora_upgrade.By default, the scripts are installed as part of the SAP bundle patch in the relevant Oracle 11.2 software home directory:/oracle//11204/sap/ora_upgrade

    Procedure1. Change to the correct directory by entering the relevant command:

    cd /oracle//11204/sap/ora_upgrade/pre_upgrade2. Execute the following commands to perform pre-upgrade tasks, which can improve the

    performance of the upgrade process:sqlplus / as sysdbaSQL> spool pre_upgrade_tasks.logSQL> @pre_upgrade_tasks.sqlSQL> spool off

    3. Execute the following commands to check the pre-upgrade status of your database:sqlplus / as sysdbaSQL> @pre_upgrade_status.sql

    ResultYou can check the results of the pre-upgrade scripts by looking at the following log files: pre_upgrade_status.log pre_upgrade_tasks.log

    3 Preparation3.7 Running the Pre-Upgrade Scripts

    24/44 CUSTOMER 2014-02-19

  • You can run the pre-upgrade scripts as often as necessary.

    CAUTIONMake the changes listed in the log file, otherwise you might have problems during the upgrade. However, you must ignore the warning regarding the possible setting of the database parameter remote_os_authent, which is reported as DEPRECATED.

    3 Preparation3.7 Running the Pre-Upgrade Scripts

    2014-02-19 CUSTOMER 25/44

  • This page is left blank for documents that are printed on both sides.

  • 4 Oracle Database Upgrade

    This section describes how to upgrade the Oracle database.1. You back up the Oracle database [page 27].2. You shut down the SAP system and Oracle listener process [page 27].3. You upgrade the database structure [page 28].4. You copy and adapt the old Oracle SQL*Net files [page 30].

    NOTEIf you have problems during the upgrade, see SAP Note 1431797.

    4.1 Backing Up the Oracle DatabaseYou must have a complete and usable database backup otherwise you might lose data if the upgrade fails.

    Procedure1. Create a complete database backup.2. 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.

    4.2 Shutting Down the SAP System and Oracle Listener Process

    You need to shut down the SAP system. If there is an Oracle listener process running in the current ORACLE_HOME, shut it down.

    Procedure1. Stop the SAP application instances by entering the following command as user adm:

    stopsap r3You can also stop the SAP application server with the sapcontrol tool.

    2. Stop the Oracle listener by entering the following command as the Oracle database software owner, user :lsnrctl stop

    4 Oracle Database Upgrade4.1 Backing Up the Oracle Database

    2014-02-19 CUSTOMER 27/44

  • NOTEMake sure that processes that log on to the database, such as CRON jobs, are not active during the upgrade. Make sure that you reschedule these processes when the upgrade has finished.

    4.3 Database Structure UpgradeAs part of the Oracle database upgrade [page 27], you upgrade the database structure.

    PrerequisitesYou have installed the database software [page 19].

    Process FlowStart the Database Upgrade Assistant to perform the upgrade [page 28].

    ResultNow continue with the Post-Upgrade Steps [page 33].

    4.3.1 Starting the Database Upgrade AssistantTo upgrade the database structure, you need to start the Oracle Database Upgrade Assistant (DBUA). The DBUA tool is a graphical tool that leads you step by step through the upgrade.

    Prerequisites Make sure that the DISPLAY environment variable is correctly set, as described in Checking and Setting

    the DISPLAY Environment Variable [page 15]. Ensure that you have write permissions on /etc/oratab or /var/opt/oracle/oratab, depending

    on your operating system.

    Procedure1. Start the DBUA.

    dbua.sap.sh is a wrapper script to automate most of the post-upgrade tasks.1. Set ORACLE_HOME_SRC and ORACLE_HOME_TGT.

    EXAMPLE Enter these commands to upgrade from 10.2.0.x to 11.2.0.4:

    setenv ORACLE_HOME_SRC /oracle//102_64setenv ORACLE_HOME_TGT /oracle//11204

    Enter these commands to upgrade from 11.2.0.x to 11.2.0.4:setenv ORACLE_HOME_SRC /oracle//112_64setenv ORACLE_HOME_TGT /oracle//11204

    2. Change to the correct directory:

    4 Oracle Database Upgrade4.3 Database Structure Upgrade

    28/44 CUSTOMER 2014-02-19

  • cd $ORACLE_HOME_TGT/sap/ora_upgrade/post_upgrade3. Run this script in query mode initially to verify that the environment for the upgrade is correct:

    ./dbua.sap.sh -q4. Run this script as follows to perform the upgrade:

    For interactive mode, enter the following command:./dbua.sap.sh

    For silent mode, enter the following command:./dbua.sap.sh -silent

    For more information on how to use dbua.sap.sh, see SAP note 1431793 or run dbua.sap.sh -help.

    2. Respond appropriately to the DBUA dialogs:The Welcome screen provides information about the upgrade assistant1. Choose Next to continue.

    The Databases screen lets you select the database to be upgraded.2. Select the correct database and choose Next.

    The DBUA now analyzes the database to be upgraded, performs pre-upgrade checks, and issues warnings if necessary.

    RECOMMENDATIONIf 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:Message Explanation or SolutionInformation message:Database is using a timezone file older than version 14

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

    Warning message:Database contains schemas with stale optimizer statistics

    Solution:Run the following command:brconnect -u / -c -f stats -t oradict_stats

    Warning message:Database contains INVALID objects prior to upgrade

    Solution:To recompile any invalid objects, use SQL*Plus to execute the script $ORACLE_HOME/rdbms/admin/utlrp.sql.Any invalid SYS/SYSTEM objects found before upgrading the database are stored in table registry$sys_inv_objsAny invalid non-SYS/SYSTEM objects found before upgrading the database are stored in table registry$nonsys_inv_objs.After the upgrade, run ORACLE_HOME/rdbms/admin/utluiobj.sql to identify any new invalid objects due to the upgrade.

    The screen Recompiling Invalid Objects 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

    4 Oracle Database Upgrade4.3 Database Structure Upgrade

    2014-02-19 CUSTOMER 29/44

  • DBUA automatically proposes the number of parallel processes to be used for the recompilation.Since you have already performed the database backup [page 27], you do not need to select the Backup option on this screen.

    3. Accept the default values, select Recompile invalid objects after the upgrade, and choose Next.The screen Move Database Files lets you move the database files during the upgrade process.

    4. Select Do not move the database files as part of the upgrade and choose Next.5. On the screen Recovery and Diagnostic Location, select Specify Flash Recovery Area if you have set up a

    restore point on the database to facilitate database recovery in the event of problems.If you select this option, make sure that you also specify the location and the size of the flash recovery area and its files.The screen Management Options lets you set up the database so that it can be managed with the Enterprise Manager.

    6. Make sure that Configure the database with Enterprise Manager is not selected and choose Next.Before you start it, the DBUA displays a summary of the 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.

    3. Review the summary of changes and choose Back to make any final adjustments, if required.NOTEFor a complete list of obsolete and deprecated parameters, see the documentation for Oracle Database 11g Release 2 (11.2).

    4. Start the database upgrade by choosing Finish.The DBUA automatically removes the database initialization parameters that are now obsolete in Oracle Database 11g Release 2 (11.2).The upgrade process itself runs for some time, depending mainly on the size of the database and the capacity of the hardware.When the DBUA has completed successfully the results of the upgrade are displayed

    5. Review the changes made and exit the DBUA.6. Make sure that the database instance has stopped after the upgrade.7. Optionally, delete the environment variables ORACLE_HOME_SRC and ORACLE_HOME_TGT.

    4.4 Copying and Adapting the SQL*Net FilesAfter the database software installation, you must copy the old SQL*Net files, that is, listener.ora, sqlnet.ora, and tnsnames.ora, and adapt them as described below. .

    NOTEIf you use the dbua.sap.sh wrapper to perform the database upgrade with DBUA, the SQL*Net files are automatically copied from the source Oracle Home to the target Oracle Home.

    4 Oracle Database Upgrade4.4 Copying and Adapting the SQL*Net Files

    30/44 CUSTOMER 2014-02-19

  • Procedure1. Log on as the Oracle database software owner, user .2. If not already copied by dbua.sap.sh, copy the SQL*Net parameter files from /

    network/admin to /network/admin.3. Edit the new SQL*Net files by adapting all file paths for the new directory. Be sure to adapt the

    value of ORACLE_HOME in the listener.ora file.4. If not available, add the following entry to the file listener.ora:

    ADR_BASE_ = /oracle/DBSID/saptraceNote 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.

    4 Oracle Database Upgrade4.4 Copying and Adapting the SQL*Net Files

    2014-02-19 CUSTOMER 31/44

  • This page is left blank for documents that are printed on both sides.

  • 5 Post-Upgrade Steps

    After the Oracle database upgrade, you need to perform the steps described here.1. If you are doing a major release upgrade, you finalize the environment of the ora user [page 33].2. You create a symbolic link for the runtime Oracle home [page 34].3. You check the upgraded database [page 34].4. You update BR*Tools [page 35].5. You perform post-upgrade tasks [page 35].6. You back up the database [page 36].7. You start the listener process [page 37].8. You deinstall the old Oracle Home [page 37].9. You check the read authorization of the adm user [page 37].10. You update the Oracle Instant Client [page 38].11. You update the JDBC driver references [page 38].12. You change the environment for the adm user [page 39].13. You update the SQL*Net configuration files for the adm and ora users [page 39].14. You check the SAP profile parameters [page 40].15. You restart the SAP system [page 41].16. If necessary, you change the national character set of your database to UTF8 [page 41].17. You configure the new features for Oracle Database 11g Release 2 (11.2) [page 41].

    NOTEMake sure that you have installed the required SAP Bundle Patch. For more information, see Installing the Required SAP Bundle Patch [page 23].

    5.1 Finalizing the Environment of the ora UserYou need to make sure that the changes you made to the Oracle user environment are permanently stored in the profiles (.cshrc, .dbenv_.csh, .dbenv_.sh, dbenv.sh, .dbenv.csh).You only need to perform this procedure if you are doing a major release upgrade. It is not necessary if you are doing a patch set upgrade. For more information about major release upgrades and patch set upgrades, see the introduction to this guide [page 7].

    5 Post-Upgrade Steps5.1 Finalizing the Environment of the ora User

    2014-02-19 CUSTOMER 33/44

  • NOTENo changes are necessary for the user Oracle software owner oracle because this user does not have .dbenv environment scripts..

    ProcedureCheck the values for the environment variables as described in Checking and Setting the Environment Variables [page 19].

    NOTEMake sure that the environment does not contain any variables that still refer to the old database release. In particular, make sure that ORACLE_HOME is set to the runtime Oracle home:/oracle//112_64

    5.2 Creating a Symbolic Link for Runtime Oracle HomeThis procedure is only necessary for the update from 11.2.0.x. It links the runtime Oracle home to the installation Oracle home .

    ProcedureUpgrading from source database 11.2.0.2 or higher1. Change to the required directory:

    cd /oracle/$DB_SID2. Delete the old symbolic link:

    If you have an ora user, enter this command:rm /oracle//112_64

    If you have an oracle user, enter this command:rm /oracle//112

    3. Create a symbolic link to the new Oracle home: If you have an ora user, enter this command:

    ln -s /oracle//11204 /oracle//112_64 If you have an oracle user, enter this command:

    ln -s /oracle//11204 /oracle//1124. To check the new database version, enter this command:

    sqlplus version5. Start the database.

    5.3 Checking the Upgraded DatabaseYou need to check the upgraded database.

    5 Post-Upgrade Steps5.2 Creating a Symbolic Link for Runtime Oracle Home

    34/44 CUSTOMER 2014-02-19

  • Procedure1. Check that the database is now running with Oracle Database 11g Release 2 (11.2) software in an

    Oracle Database 11g Release 2 (11.2) environment by entering the following commands:1. Log on to the database as the ora user.2. Change to the correct directory:

    cd $ORACLE_HOME/sap/ora_upgrade/post_upgrade3. Enter the following command to start SQL*Plus:

    sqlplus / as sysdba4. Run post_upgrade_status.sql:

    SQL> @post_upgrade_status.sqlCheck the log post_upgrade_status.log.

    EXAMPLEThis is an example of the output from this command:COMP ID VERSION STATUSCATALOG 11.2.0.4.0 VALIDCATPROC 11.2.0.4.0 VALID

    Make sure that the command returns the status VALID.2. Check that the value for the version returned from the above command is the same level as the

    installed patchset.

    RECOMMENDATIONIf the old database used an initialization file init.ora, the DBUA automatically creates an spfile. We recommend that you continue to use the spfile. Do not switch back to the initialization file after the upgrade.

    5.4 Updating BR*ToolsYou update BR*Tools to the latest release, with the latest patch level. For more information, see SAP Notes 1430669 and 12741.

    Procedure1. Download the most current version of the BR*Tools from SAP Service Marketplace at:

    http://service.sap.com/swdc

    5.5 Performing Post-Upgrade TasksYou need to perform certain post-upgrade tasks.

    5 Post-Upgrade Steps5.4 Updating BR*Tools

    2014-02-19 CUSTOMER 35/44

  • ProcedureNOTEIf you use SecureStore for the BR*Tools, replace the / in the brcconnect commands below with //; for example use brconnect -u // -c -f stats -t system_stats instead of brconnect -u / -c -f stats -t system_stats

    1. Check database compatibility by executing the following command:SQL> show parameter compatibleIf set to a value less than 11.2.0, change database compatibility by entering the following as the Oracle database software owner, user :cd $ORACLE_HOME/sap/ora_upgrade/post_upgradeSQL> conn / as sysdbaSQL> @set_compatible

    2. Gather Oracle optimizer statistics by executing the following commands as the user:brconnect -u / -c -f stats -t system_statsbrconnect -u / -c -f stats -t oradict_stats

    3. 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.

    4. Update the Oracle database statistics with BRCONNECT as follows:brconnect -u / -c -f stats -t all -f collect -p 4

    NOTEFor more information about update statistics, see the documentation SAP Database Guide: Oracle at:www.sdn.sap.com/irj/sdn/ora SAP ON ORACLE KNOWLEDGE CENTER SAP

    Documentation5. Run post_ugprade_status.sql.

    Open a command prompt and change to the directory /sap/ora_upgrade/post_ugprade.From this directory start sqlplus.exe and enter the following commands:SQL>connect / as sysdbaSQL>@post_upgrade_status.sqlThis provides an overview of the status of the upgraded database.

    5.6 Backing Up the DatabaseYou need to back up your upgraded Oracle Database 11g database.

    5 Post-Upgrade Steps5.6 Backing Up the Database

    36/44 CUSTOMER 2014-02-19

  • CAUTIONYou risk losing data if you do not back up your database.

    ProcedurePerform a full database backup.

    5.7 Starting the Listener ProcessYou start the listener process.

    PrerequisitesMake sure that you have copied the SQL*Net configuration files from the old Oracle installation to the location of the Oracle Database 10g software, as described in Copying and Adapting the SQL*Net Files [page 30].

    Procedure1. Start the listener:

    lsnrctl start2. Check that you can remotely connect to the database through the listener:

    sqlplus SAP/pwd@SID

    5.8 Deinstalling the Old Oracle HomeOnce the database is running correctly, you need to deinstall the old Oracle Home to prevent accidental usage of the old binaries.To delete the old Oracle Home, see SAP Note 1525025 (for Oracle release 11.2 and higher).

    ProcedureFollow the procedure in the above SAP Note to deinstall the old Oracle Home directory.

    5.9 Checking the Read Authorization of the adm UserYou check the read authorization of the adm user.

    Procedure1. Make sure that the adm user has read authorization for the directory $ORACLE_HOME.2. If this is not true, enter the following command as the Oracle database software owner, user

    :chmod 755 $ORACLE_HOME

    5 Post-Upgrade Steps5.7 Starting the Listener Process

    2014-02-19 CUSTOMER 37/44

  • 5.10 Updating the Oracle Instant ClientYou need to ensure that the SAP system runs with at least Instant Client release recommended in SAP Note 819829.

    NOTEIf you have a SAP 7.XX EXT kernel, you must install the current 11g Instant Client.

    PrerequisitesFor the required Instant Client release, see SAP Note 819829.

    ProcedureUpdate the Oracle Database Instant Client for UNIX as described in SAP Note 1431794.Only valid for: ABAP+Java;Java;Java Add-In |

    5.11 Updating the JDBC Driver ReferencesIf you have an SAP system with Java components, you have to change the JDBC driver references after you have upgraded the database client software. Otherwise the J2EE Engine cannot start because the driver references still point to the old Oracle client software home.

    NOTEYou only need to perform this procedure if the major version of your Oracle client software has changed.

    If your SAP software is version 7.0 or below, follow SAP Note 867976 to change the JDBC driver references in the J2EE engine.If your SAP software is version 7.1 or higher, change the reference to the JDBC driver in the instance profile as described below.

    Procedure1. Change to the correct directory containing the file _J_.2. Open the file with your text editor and search for property j2ee/dbdriver.3. Replace the old driver location with the new one:

    /oracle/client/x_64/instantclient/.jarwhere is the major version of the Oracle client that you are using after this upgrade.

    CAUTIONDo not change the file .jar, which is one of the following: ojdbc14.jar

    5 Post-Upgrade Steps5.10 Updating the Oracle Instant Client

    38/44 CUSTOMER 2014-02-19

  • ojdbc6.jarEnd of: ABAP+Java;Java;Java Add-In |

    5.12 Changing the Environment for the adm userYou have to change the environment for the adm user, but only on the database server.

    NOTEYou do not need to change the environment for adm on application servers if you are still using the old Oracle 10g clients.

    Procedure1. On the database server, set the ORACLE_HOME environment variable to point to the location of the

    Oracle Database 11g software installation, for example:/oracle//112_64

    2. Make sure that the change to the user environment is permanently stored in the profiles (.cshrc, .dbenv_.csh, and so on).

    3. Log out and log on again as the adm user.4. Check whether R3trans can connect to the database:

    R3trans d

    5.13 Updating the SQL*Net Configuration Files for the adm and ora Users

    You need to update the tnsnames.ora file for the adm and ora users after the upgrade: For the ora user, you need to adapt the SQL*Net files are located in the directory

    $ORACLE_HOME/network/admin. For the adm user, you need to adapt the SQL*Net files that are located in the directory

    pointed to by the environment variable TNS_ADMIN.

    NOTEYou do not need to perform this procedure for the Oracle software owner oracle.

    NOTEDBUA modifies the SQLNET profiles in the directory /network/admin if they already exist when the upgrade is started.

    ProcedureAdapting the SQL*Net Files for the ora User1. Add the following entry to the tnsnames.ora file that is used by the adm user:

    5 Post-Upgrade Steps5.12 Changing the Environment for the adm user

    2014-02-19 CUSTOMER 39/44

  • LISTENER_.WORLD = (ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)(HOST = )(PORT = ))

    NOTEAlthough this entry is only needed on the database server or on central systems where the startdb or stopdb scripts are used, it is recommended to repeat the change described above on all application servers. Without this entry, the startdb or stopdb script fails with the following error message:ORA-00119: invalid specification for system parameter LOCAL_LISTENER

    Adapting the SQL*Net Files for the adm User1. Determine the SQL*Net files used by adm as follows:

    If the environment variable TNS_ADMIN is set, the SQL*Net files are used from the specified location (even if ORACLE_HOME is set).

    If the environment variable TNS_ADMIN is not set, look for a tnsnames.ora file under /etc and use this file for the change described below in the next step.

    2. Add the following entry to the tnsnames.ora file that is used by the adm user:LISTENER_.WORLD = (ADDRESS = (COMMUNITY = SAP.WORLD)(PROTOCOL = TCP)(HOST = )(PORT = ))

    NOTEAlthough this entry is only needed on the database server or on central systems where the startdb or stopdb scripts are used, it is recommended to repeat the change described above on all application servers. Without this entry, the startdb or stopdb script fails with the following error message:ORA-00119: invalid specification for system parameter LOCAL_LISTENER

    5.14 Checking SAP Profile ParametersYou have to check the following SAP profile parameters: DIR_ORAHOME DIR_CLIENT_ORAHOME DIR_SERVER_ORAHOMEProcedure1. Set DIR_ORAHOME and DIR_CLIENT_ORAHOME in the instance profiles to the corresponding values of

    the ORACLE_HOME environment variable of the adm user.These variables point to the ORACLE_HOME used by the application server.

    2. Set DIR_SERVER_ORAHOME in the default profile to the value of the ORACLE_HOME environment variable of the Oracle database software owner, user , on the database server.

    5 Post-Upgrade Steps5.14 Checking SAP Profile Parameters

    40/44 CUSTOMER 2014-02-19

  • 5.15 Starting the SAP SystemYou need to restart the SAP system.

    Procedure1. If R3trans connects without problems, start the SAP system:

    startsap2. Check the new Oracle version using SAP transaction ST04.

    5.16 Checking the National Character SetIf your database still runs with a national character set (NLS_NCHAR_CHARACTERSET) different from UTF8, you should change it to UTF8. You can expect to experience severe problems during SAP upgrades if the database national character set is not set to UTF8. If you already use a Java system or plan to use one in the future, the national character set must be UTF8.

    ProcedureIf necessary, follow SAP Note 669902 to change the national character set to UTF8.

    5.17 Configuring the New Features for Oracle Database 11g Release 2 (11.2)

    You can configure the new Oracle Database 11g Release 2 (11.2) features.

    ProcedureFor more information about new features with Oracle Database 11g Release 2 (11.2) see SAP Note 1431800. This note provides links to other SAP notes that describe how to configure or activate each new feature.

    5 Post-Upgrade Steps5.15 Starting the SAP System

    2014-02-19 CUSTOMER 41/44

  • SAP AGDietmar-Hopp-Allee 16

    69190 WalldorfGermany

    T +49/18 05/34 34 34F +49/18 05/34 34 20

    www.sap.com

    Copyright 2014 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications may vary.These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

    DisclaimerPlease see http://www.sap.com/corporate-en/legal/copyright/index.epx for disclaimer information and notices.

    Documentation in the SAP Service MarketplaceYou can find this document at the following address: http://service.sap.com/instguides

    42/44 CUSTOMER 2014-02-19

  • SAP AGDietmar-Hopp-Allee 1669190 WalldorfGermanyT +49/18 05/34 34 34F +49/18 05/34 34 20www.sap.com

    Copyright 2014 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

    Upgrade to Oracle Database 11g Release 2 (11.2): UNIXTable of Contents1 Introduction1.1 New Features1.2 SAP Notes for the Upgrade1.3 More Information on SAP Service Marketplace

    2 Planning2.1 Checking the Original Version of Your Database2.2 Checking Hardware and Software Requirements2.3 Reviewing the Kernel Parameters and Shell Limits2.4 Checking Additional Requirements for the Upgrade2.5 Checking the SAP System Prerequisites

    3 Preparation3.1 Checking and Setting the DISPLAY Environment Variable3.2 Checking UNIX Users, Groups, and Authorizations3.3 Checking the Directory Structure3.4 Updating the SAP RUNINSTALLER Scripts3.5 Checking the Software Installation Prerequisites3.6 Installation of Oracle Database Software3.6.1 Checking and Setting the Environment Variables3.6.2 Backing Up the Central Oracle Inventory3.6.3 Installing the Oracle Database Software3.6.4 Installing the Required SAP Bundle Patch

    3.7 Running the Pre-Upgrade Scripts

    4 Oracle Database Upgrade4.1 Backing Up the Oracle Database4.2 Shutting Down the SAP System and Oracle Listener Process4.3 Database Structure Upgrade4.3.1 Starting the Database Upgrade Assistant

    4.4 Copying and Adapting the SQL*Net Files

    5 Post-Upgrade Steps5.1 Finalizing the Environment of the ora User5.2 Creating a Symbolic Link for Runtime Oracle Home5.3 Checking the Upgraded Database5.4 Updating BR*Tools5.5 Performing Post-Upgrade Tasks5.6 Backing Up the Database5.7 Starting the Listener Process5.8 Deinstalling the Old Oracle Home5.9 Checking the Read Authorization of the adm User5.10 Updating the Oracle Instant Client5.11 Updating the JDBC Driver References5.12 Changing the Environment for the adm user5.13 Updating the SQL*Net Configuration Files for the adm and ora Users5.14 Checking SAP Profile Parameters5.15 Starting the SAP System5.16 Checking the National Character Set5.17 Configuring the New Features for Oracle Database 11g Release 2 (11.2)

    Copyright and trademarks