guide ux ora upgrade

46
38%/,& 'DWDEDVH 8SJUDGH *XLGH 8 S J U D G H W R 2 U D F O H ' D W D E D V H J 5 H O H D V H 8 1 , ; 7DUJHW $XGLHQFH n Technology Consultants n System Administrators Document version: 2.1 ‒ 08/28/2006

Upload: blackfish5

Post on 20-Dec-2015

233 views

Category:

Documents


3 download

DESCRIPTION

Guide Ux ORA upgrade

TRANSCRIPT

Page 1: Guide Ux ORA upgrade

PUBLIC

Database Upgrade Guide

Upgrade to OracleDatabase 10g Release2 (10.2): UNIXTarget Audience

n Technology Consultants

n System Administrators

Document version: 2.1 ‒ 08/28/2006

Page 2: Guide Ux ORA upgrade

SAP AGDietmar-Hopp-Allee 16

69190 WalldorfGermany

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

www.sap.com

© Copyright 2006 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmittedin any form or for any purpose without the express permissionof SAP AG. The information contained herein may be changedwithout prior notice.

Some software products marketed by SAP AG and itsdistributors contain proprietary software components of othersoftware vendors.

Microsoft, Windows, Outlook, and PowerPoint are registeredtrademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex,MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries,xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere,Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, OpenPowerand PowerPC are trademarks or registered trademarks of IBMCorporation.

Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of

the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,

VideoFrame, and MultiWin are trademarks or registeredtrademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks orregistered trademarks of W3C®, World Wide Web Consortium,Massachusetts Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of SunMicrosystems, Inc.,

used under license for technology invented and implemented byNetscape.

MaxDB is a trademark of MySQL AB, Sweden.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver,

and other SAP products and services mentioned herein as well as

their respective logos are trademarks or registered trademarks ofSAP AG in Germany and in several other countries all over theworld. All other product and service names mentioned are thetrademarks of their respective companies. Data contained in thisdocument serves informational purposes only. National productspecifications may vary.

These materials are subject to change without notice. Thesematerials are provided by SAP AG and its affiliated companies(“SAP Group”) for informational purposes only, withoutrepresentation or warranty of any kind, and SAP Group shall notbe liable for errors or omissions with respect to the materials.The only warranties for SAP Group products and services arethose that are set forth in the express warranty statementsaccompanying such products and services, if any. Nothing hereinshould be construed as constituting an additional warranty.

This document was created using stylesheet 2005-12-31(V3.2) and XSLT processor SAXON 6.5.2 from Michael Kay(http://saxon.sf.net/), XSLT version 1.

DisclaimerSome components of this product are based on Java™. Any codechange in these components may cause unpredictable and severemalfunctions and is therefore expressively prohibited, as is anydecompilation of these components.

Any Java™ Source Code delivered with this product is onlyto be used by SAP’s Support Services and may not be modified oraltered in any way.

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

ii PUBLIC 08/28/2006

Page 3: Guide Ux ORA upgrade

Typographic Conventions

Example Description

<> Angle brackets indicate that you replace these words or characters with appropriate entries tomake entries in the system, for example, “Enter your <User Name>”.

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

Example Emphasized words or expressions

Example Words or characters that you enter in the system exactly as they appear in the documentation

Example Textual cross-references to a URL, for example, www.sap.com

/example Shortcuts added to the URL of a homepage to enable quick access to specific content on theWeb

123456 Hyperlink to an SAP Note, for example, SAP Note 123456

Example n Words or characters quoted from the screen. These include field labels, screen titles,pushbutton labels, menu names, and menu options.

n Cross-references to other documentation or published works

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

installation, upgrade, and database tools

EXAMPLE Technical names of system objects. These include report names, program names, transactioncodes, database table names, and key concepts of a programming language when they aresurrounded by body text, for example, SELECT and INCLUDE

EXAMPLE Keys on the keyboard

08/28/2006 PUBLIC iii

Page 4: Guide Ux ORA upgrade

Document History

.Caution

Before you start the implementation, make sure you have the latest version of this document. You canfind the latest version at the following location:

service.sap.com/instguides ® Other Documentation ® Database Upgrades ® Oracle

The following table provides an overview of the most important document changes.

Version Date Description

2.1 8/28/0606 Various changes including new section "Disabling Database User Locking Mechanismfor Failed Logins"

2.0 8/1/0606 Various changes including new section "Installing Oracle Critical Patch Updates"

iv PUBLIC 08/28/2006

Page 5: Guide Ux ORA upgrade

Table of Contents

Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 SAP Notes for the Upgrade . . . . . . . . . . . . . . . . . . . . . . . 21.3 More Information on SAP Service Marketplace . . . . . . . . . . . . . . . . 3

Chapter 2 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1 Checking the Original Version of Your Database . . . . . . . . . . . . . . . 52.2 Checking Hardware and Software Requirements . . . . . . . . . . . . . . . 62.3 Reviewing the Oracle-Specified Kernel Parameters and Shell Limits . . . . . . . . 72.4 Checking Additional Requirements for the Upgrade . . . . . . . . . . . . . . 7

Chapter 3 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.1 Checking the Correct UNIX Users, Groups, and Authorizations . . . . . . . . . 93.2 Checking the Directory Structure . . . . . . . . . . . . . . . . . . . . 93.3 Running the Pre-Upgrade Script . . . . . . . . . . . . . . . . . . . . . 113.4 Checking the Prerequisites for the Oracle Universal Installer . . . . . . . . . . . 123.5 Checking the SAP System Prerequisites . . . . . . . . . . . . . . . . . . 123.6 Migrating to Automatic Undo Management . . . . . . . . . . . . . . . . . 133.7 Stopping Statspack Reports . . . . . . . . . . . . . . . . . . . . . . . 143.8 Checking the SYSTEM and SYSAUX Tablespace for Freespace . . . . . . . . . . 143.9 Checking for Invalid Database Objects . . . . . . . . . . . . . . . . . . . 153.10 Installing the Oracle Instant Client . . . . . . . . . . . . . . . . . . . . 15

Chapter 4 Oracle Database Upgrade . . . . . . . . . . . . . . . . . . . . . . . 174.1 Database Software Installation . . . . . . . . . . . . . . . . . . . . . . 174.1.1 Checking and Setting the Environment Variables . . . . . . . . . . . . . . . 184.1.2 Backing Up the Oracle Inventory . . . . . . . . . . . . . . . . . . . . . 204.1.3 Performing Steps for the AIX Operating System . . . . . . . . . . . . . . . 204.1.4 Running the Oracle Universal Installer . . . . . . . . . . . . . . . . . . 214.1.5 Installing the Current Patch Set . . . . . . . . . . . . . . . . . . . . . 224.1.6 Installing Required Interim Patches . . . . . . . . . . . . . . . . . . . . 224.1.7 Copying and Adapting the SQL*Net Files . . . . . . . . . . . . . . . . . . 234.1.8 Backing Up the Oracle Database . . . . . . . . . . . . . . . . . . . . . 244.1.9 Shutting Down the SAP System and Oracle Listener Process . . . . . . . . . . . 244.2 Database Structure Upgrade . . . . . . . . . . . . . . . . . . . . . . 244.2.1 Checking the oratab Entry . . . . . . . . . . . . . . . . . . . . . . . 254.2.2 Starting the Database Upgrade Assistant . . . . . . . . . . . . . . . . . . 25

Chapter 5 Post-Upgrade Steps . . . . . . . . . . . . . . . . . . . . . . . . . 29

08/28/2006 PUBLIC v

Page 6: Guide Ux ORA upgrade

5.1 Finalizing the Environment of the ora<dbsid>User . . . . . . . . . . . . . . 295.2 Checking the Upgraded Database . . . . . . . . . . . . . . . . . . . . . 295.3 Updating BR*Tools . . . . . . . . . . . . . . . . . . . . . . . . . . 315.4 Backing Up the Database . . . . . . . . . . . . . . . . . . . . . . . . 315.5 Performing Post-Upgrade Tasks . . . . . . . . . . . . . . . . . . . . . 325.6 Installing Oracle Critical Patch Updates . . . . . . . . . . . . . . . . . . 345.7 Checking the oratab entry . . . . . . . . . . . . . . . . . . . . . . . 345.8 Starting the Listener Process . . . . . . . . . . . . . . . . . . . . . . 355.9 Renaming the Old $ORACLE_HOME/bin Directory . . . . . . . . . . . . . . 355.10 Checking the Read Authorization of the <sapsid>adm User . . . . . . . . . . . 355.11 Changing the Environment for the <sapsid>adm user . . . . . . . . . . . . . 365.12 Checking SAP Profile Parameters . . . . . . . . . . . . . . . . . . . . . 365.13 Changing the Location of the JDBC Driver . . . . . . . . . . . . . . . . . 375.14 Starting the SAP System . . . . . . . . . . . . . . . . . . . . . . . . 395.15 Disabling Database User Locking Mechanism For Failed Logins . . . . . . . . . . 395.16 Configuring the New Features for Oracle Database 10g Release 2 (10.2) . . . . . . . 39

vi PUBLIC 08/28/2006

Page 7: Guide Ux ORA upgrade

1 Introduction

1 Introduction

This documentation explains how to upgrade the Oracle database for the SAP system on theUNIX operatingsystem:

n From Oracle version 9.2.0 or Oracle Database 10g Release 1 (10.1.0.4)n To Oracle Database 10g Release 2 (10.2)

.Caution

SAP certifies Oracle 10.2 only from release 10.2.0.2. SAP does not certify nor support Oracle 10.2.0.1.Make sure that your target release is Oracle 10.2.0.2 or later.

This documentation only covers the upgrade from Oracle 9.2.0.4 or later ‒ including Oracle 10.1.0.4 ‒ to OracleDatabase 10g Release 2 (10.2).

.Note

Oracle offers and supports direct database upgrades from Oracle 8.1.7 to Oracle 10.2, but SAP does notrecommend this.We do not describe direct upgrades in this documentation. SAP has not tested and validated the direct

upgrade path from Oracle 8.1.7 to Oracle 10.2. If you intend to perform a direct upgrade from Oracle 8.1.7to Oracle 10.2, see the Oracle Database 10g Release 2 (10.2) upgrade documentation.

You can obtain the Oracle documentation after registering at the Oracle Technology Network (OTN) website,www.oracle.com/technology.You use the tools Oracle Universal Installer (OUI), Oracle SQL*Plus, and Oracle Database Upgrade Assistant

(DBUA) to perform the upgrade.

.Caution

Make sure you have the latest version of this document. You can always find this as follows:service.sap.com/instguides ® Other Documentation ® Database Upgrades ® Oracle.

.Note

In this document we use <DBSID> for the database instance identifier and <SAPSID> for the SAP systemidentifier. These can be different if your:

n Database system uses Oracle Real Application Cluster (RAC)

n SAP system uses Multiple Components in One Database (MCOD) Implementation Considerations

Implementation Considerations

n For more information on implementation considerations, including the most important SAP Notes for theupgrade, see Planning [page 5].

08/28/2006 PUBLIC 1

Page 8: Guide Ux ORA upgrade

1 Introduction

1.1 New Features

n Be sure to read the relevant SAP Notes before beginning the upgrade. These notes contain the most recentinformation about the upgrade, as well as corrections to the documentation. You can find the mostrecent version of the SAP Notes:service.sap.com/notes

n Make sure you are using the Oracle Universal Installer (OUI) shipped with the installation CDs for OracleDatabase 10g Release 2 (10.2).

1.1 New Features

For the complete list of new features of the Oracle Database 10g Release 2 (10.2), see the New Featuresdocumentation from Oracle.You can access the complete Oracle documentation as a member of the Oracle Technology Network

(OTN) at:www.oracle.com/documentation

For more information on joining OTN, see:www.oracle.com/technology

.Recommendation

We recommend that you check themost important new features in the Oracle documentation since somenew features might affect the operation of your production system.

1.2 SAP Notes for the Upgrade

Make sure that you read the following SAP Notes, which you can find at service.sap.com/notes:

Number Title Remarks

819830 Oracle Database 10g: AdditionalInformation on upgrade: UNIX

Required late-breaking information

720886 Oracle Database 10g: Integration intothe SAP environment

Provides information aboutintegration of Oracle Database10g products / options within SAP

828268 Oracle Database 10g: New Functions Provides information about the OracleDatabase 10g features which can beused within an SAP environment.Also contains links to notes describingthe procedure to activate some of thenew Oracle Database 10g features.

830576 Oracle Database 10g: Default /Obsolete Parameters

Provides information about Oracleinitialization parameters which needto be reset to their default values orwhich need to be removed

2 PUBLIC 08/28/2006

Page 9: Guide Ux ORA upgrade

1 Introduction

1.3 More Information on SAP Service Marketplace

Number Title Remarks

841728 Oracle Database 10g: SoftwareInstallation Problems

Describes known software installationproblems and solutions orworkarounds

871735 Oracle Database 10g: Current PatchSet

Describes the current Oracle patch set

871096 Oracle Database 10g: Patch Sets andPatches

Lists the status of Oracle patch setsand interim patches for 10.2

850306 Oracle Critical Patch Update Program Describes the current Oracle securityfixes

134592 Update SAPDBA Role Describes how to update the SAPDBArole after the upgrade

834917 SAPCONN Role Describes the new SAPCONN role,which replaces the native CONNECTrole from Oracle

819829 Installation of Oracle 10.x Clientsoftware

Required for upgrading Oracle clientsoftware to Oracle Database 10gRelease 2 (10.2)

839182 Oracle Database 10g: OPatch Describes how to use OPatch withOracle Database 10g Release 2 (10.2)

306408 OPatch Patch Installation Describes how to install an interimpatch (this was previously called aone-off patch)

868681 Oracle Database 10g: Database releasecheck

Describes some additional transportsto be applied to SAP systems 640and below before upgrade to Oracledatabase 10g

1.3 More Information on SAP Service Marketplace

You can find more information as following on SAP Service Marketplace:

Description Internet Address Title

SAP Notes service.sap.com/notes None

Oracle Database Administration service.sap.com/dbaora ® MediaLibrary ® General

SAP Database Guide: Oracle

SAP Software Distribution Center service.sap.com/swdc None

Oracle Database Upgrade Guide (thatis, the guide you are now reading)

service.sap.com/insguides ® OtherDocumentation ® Database Upgrades ®Oracle

Upgrade to Oracle Database <Version>:UNIX

08/28/2006 PUBLIC 3

Page 10: Guide Ux ORA upgrade

This page is intentionally left blank.

Page 11: Guide Ux ORA upgrade

2 Planning

2 Planning

1. You check the original version of your database [page 5].2. You check the hardware and software requirements [page 6].3. You review the Oracle-specified kernel parameters and shell limits [page 7].4. You check additional requirements for the upgrade [page 7].

2.1 Checking the Original Version of Your Database

You need to check the original version of the database you want to upgrade.

.Caution

This SAP upgrade documentation only covers the standard upgrade from Oracle 9.2.0.4 or later to OracleDatabase 10g Release 2 (10.2) using the Oracle Database Upgrade Assistant (DBUA).

ProcessIn the following special cases you need to get more information:

n If you are upgrading from Oracle 8.1.7 or an earlier release, read the Oracle Database 10g Release 2 (10.2)upgrade documentation for information on the special steps required. Although Oracle supports directupgrades from Oracle 8.1.7 to Oracle 10.2.0, SAP recommends customers running Oracle 8.1.7 to firstupgrade to Oracle 9.2.0 and then to Oracle 10.2.0.

n If you are upgrading from Oracle 9.2.0 to Oracle Database 10g Release 2 (10.2) in manual mode.n If the source database runs Oracle 9.2.0.3, 9.2.0.2, or 9.2.0.1, you need to update the source database to

patchset 9.2.0.4 or later. The DBUA checks for the source release of the Oracle 9.2 database. If the sourcedatabase runs on a lower version than Oracle 9.2.0.4 you cannot proceed.

For more information in these special cases, see the Oracle Database 10g Release 2 (10.2) upgradedocumentation at:

www.oracle.com/technology/documentation

Select the appropriate documentation for Oracle Database 10g Release 2 (10.2).

.Recommendation

If the source database is Oracle 10.1 we strongly recommend that it is at least version Oracle 10.1.0.4.

08/28/2006 PUBLIC 5

Page 12: Guide Ux ORA upgrade

2 Planning

2.2 Checking Hardware and Software Requirements

2.2 Checking Hardware and Software Requirements

You need to check that you meet the hardware and software requirements for running the new Oraclerelease. The complete list of hardware and software requirements for every platform is included in the Oracledocumentation.

.Caution

To make sure that the checks complete successfully, you must complete this procedure before running theOracle Universal Installer [page 21].

PrerequisitesYou can access the complete Oracle documentation referred to below as a member of the Oracle TechnologyNetwork (OTN) at:

www.oracle.com/documentation

For more information on joining OTN, see:www.oracle.com/technology

Procedure

1. Note the following general hardware requirements:n At least 1024 MB of physical RAMn About 500 MB free space in the /tmp directoryn Between 2 GB and 3.5 GB of disk space for the Oracle software

2. Check that your operating system meets the software requirements for running the new Oracle release,including all required patches. You might need to upgrade your operating system before you start. Thecomplete list of software requirements for every operating system is included in the Oracle documentation.

.Recommendation

If you have access to Oracle Metalink we strongly recommend that you read document 169706.1. Thisdocument provides information on all operating system prerequisites and is regularly updated.

3. Get the full and updated list of hardware and software requirements from the relevant Oracle databaseinstallation guide for your operating system, which you can find at one of the following:www.oracle.com/technology/documentation

Select the appropriate documentation for Oracle Database 10g Release 2 (10.2).

.Caution

If your database resides on Network Attached Storage (NAS) you need to review and implement theOracle NAS guidelines. You need to mount network file systems with specific mount options, whichyou can find in the Oracle installation guide.

6 PUBLIC 08/28/2006

Page 13: Guide Ux ORA upgrade

2 Planning

2.3 Reviewing the Oracle-Specified Kernel Parameters and Shell Limits

2.3 Reviewing the Oracle-Specified Kernel Parameters and ShellLimits

You need to review the Oracle-recommended kernel parameters and shell limits for your operating systemwith Oracle Database 10g Release 2 (10.2).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 kernelparameters accordingly.

ProcedureGet the recommended shell limits and kernel parameters from the relevant Oracle database installation guidefor your operating system, which you can find at:

www.oracle.com/technology/documentation

Select the appropriate documentation for Oracle Database 10g Release 2 (10.2).

2.4 Checking Additional Requirements for the Upgrade

You need to check the additional requirements for the Oracle database upgrade as described in this section.

Procedure

1. Make sure you have read the SAP Notes for the upgrade [page 2], which you can find at service.sap.com/notes:2. Make sure your operating system and initial database version meets SAP requirements. We approve specific

combinations of operating system version, database version, SAP Release, and SAP kernel release:n SAP Release 4.6x, see SAP Note 156548n SAP Release 6.x, see SAP Note 407314

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

.Recommendation

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

4. Get the Oracle Database 10g Release 2 (10.2) installation guide for your operating system from the OracleTechnology Network at:www.oracle.com/technology

You need this document to review the hardware and software requirements and to configure the kernelparameters and shell limits.

.Recommendation

If you have access to Oracle Metalink we strongly recommend that you read document 169706.1. Thisdocument provides information on all operating system prerequisites and is regularly updated.

5. Get the Oracle Database 10g Release 2 (10.2) software and the latest patch sets and required patches.

08/28/2006 PUBLIC 7

Page 14: Guide Ux ORA upgrade

2 Planning

2.4 Checking Additional Requirements for the Upgrade

The list of one-off patches is described in SAP Note 871096. You can download the patches from SAPService Marketplace at:service.sap.com/swcenter-3pmain

.Caution

n The one-off patches listed in SAP Note 871096 are mandatory. To avoid severe database problems,make sure that you install all these one-off patches.

n SAP certifies Oracle 10.2 only from release 10.2.0.2. SAP does not certify nor support Oracle10.2.0.1.Make sure that your target release is Oracle 10.2.0.2 or later.

6. Get the latest version of the Oracle 10.2 Instant Client software from SAP Service Marketplace at:service.sap.com/swcenter-3pmain

7. Get the latest version of the DBATOOLS (BR*Tools) Release 7.00 to be used immediately after the databaseupgrade from SAP Service Marketplace at:service.sap.com/swdc

8 PUBLIC 08/28/2006

Page 15: Guide Ux ORA upgrade

3 Preparation

3 Preparation

.Note

You have already planned the database upgrade [page 5].

You have to complete the following preparations:

1. You check the correct UNIX users, groups, and authorizations [page 9].2. You check the directory structure [page 9].3. You run the pre-upgrade script [page 11].4. You check the prerequisites for the Oracle Universal Installer [page 12].5. You check the SAP System prerequisites [page 12].6. If required, you migrate to automatic undo management [page 13].7. If required, you stop Statspack reports [page 14].8. You check the SYSTEM and SYSAUX tablespace for freespace [page 14].9. If required, you check for invalid database objects [page 15].10. You install the Oracle Instant Client [page 15].

3.1 Checking the Correct UNIX Users, Groups, and Authorizations

You need to check that the ora<dbsid> user has write authorization for the /oracle directory, since theora<dbsid> user performs the database installation.

Procedure

1. Enter the following commands:touch /oracle/write_test

rm /oracle/write_test

If the user ora<dbsid> does not have write authorization, log on to your system with the user root andenter the command:chgrp dba /oracle

chmod 775 /oracle

Check if you are able to start an Xterm as the Oracle user since this is the user who invokes the OUI.2. Enter the following command with the user ora<dbsid>:

umask 022

3.2 Checking the Directory Structure

You need to verify the availability and correctness of the following Oracle directories:

08/28/2006 PUBLIC 9

Page 16: Guide Ux ORA upgrade

3 Preparation

3.2 Checking the Directory Structure

n stage directoryn Oracle inventory directoryn Home directory

Procedure

1. 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 stagesfrom previous installations or upgrades.a) For the upgrade to Oracle Database 10g Release 2 (10.2) create the staging directory

/oracle/stage/102_64.b) Make sure that you have around 2 GB free space for the SAR files. To extract all RDBMS SAR files

requires around 5 GB of free space in the staging directory but for this upgrade you only require theSAR file containing the database component, which is contained in OR110264.SAR for 64-bit platformsor OR110232.SAR for 32-bit platforms.If there is not enough space you can delete previous stage directories.

c) When the RDBMS CDs have been mounted, use the SAP tool SAPCAR to extract all the RDBMSCDs to /oracle/stage/102_64 as user ora<sid>.For example, the following command extracts one CD:SAPCAR –xvf OR110264.SAR

After you have finished the extraction of all the RDBMS CDs, the following sub-directories exist under/oracle/stage/102_64:

n database

n client

n clusterware

n companion

n gateways

.Note

For some platforms Disk1 and Disk2might be created as sub-directories of database, client,clusterware, companion, and gateways.The gateways sub-directory is not created for the following platforms:n Linux on Power

n HP_UX on Itanium

n Solaris x86_64

d) After extraction of the Oracle software to /oracle/stage/102_64 do the following:A) Rename the original SAP folder by performing one of the following:

n mv /oracle/stage/102_64/database/SAP /oracle/stage/102_64/database/SAP_ORIG

n mv /oracle/stage/102_64/database//Disk1/SAP

/oracle/stage/102_64/database//Disk1/SAP_ORIG

B) Download the file RDBMS_SAP_32.zip (for 32-bit platforms) or RDBMS_SAP_64.zip (for 64-bitplatforms) attached to SAP Note 819830 and copy it to a temporary location such as /tmp.

C) Extract the zip file by performing one of the following:

10 PUBLIC 08/28/2006

Page 17: Guide Ux ORA upgrade

3 Preparation

3.3 Running the Pre-Upgrade Script

n cd /oracle/stage/102_64/database

unzip /tmp/RDBMS_SAP.zip

n cd /oracle/stage/102_64/database/Disk1

unzip /tmp/RDBMS_SAP.zip

You should now see the directory SAP extracted with the updated version of SAP-specific files.2. Check the Oracle inventory directory.

The Oracle inventory directory maintains the inventory of all Oracle software installed on the system. Thepath to the Oracle inventory directory is mentioned in the file oraInst.loc, which you can find under/var/opt/oracle or under /etc.One of the entries of oraInst.loc or inventory_location points to the location of the Oracle inventory.When you execute the OUI for the first time on the system, the OUI prompts you for the path to theinventory directory. The default location for the Oracle inventory is $ORACLE_BASE/oraInventory.

.Note

This applies only to systems where the OUI has been executed for the first time. The OUI automaticallycreates theoraInst.loc and the inventory directory. You do not need to create these directoriesmanually.

3. Create the empty Oracle home directory before starting the OUI.You need to create the Oracle home directory before you can start the Oracle software installation. TheOracle Home directory is normally /oracle/<DBSID>/102_64.

3.3 Running the Pre-Upgrade Script

You run the Oracle pre-upgrade information tool. This tool provides information on the existing pre-upgradedatabase. It also suggests any changes that you need to make before you start the upgrade.

.Note

You always execute this script as the ora<dbsid> user connected to the database as sysdba in the Oracle9i environment.

PrerequisitesYou are logged on as user ora<dbsid> in the Oracle 9i environment with the database also started up.

ProcedureExecute the following commands:

sqlplus /nolog

SQL> connect / as sysdba

SQL> spool /tmp/pre_upgrade.log

SQL> @/oracle/stage/102_64/database/SAP/utlu102i.sql

or:SQL> @/oracle/stage/102_64/database/Disk1/SAP/utlu102i.sql

SQL> spool off

08/28/2006 PUBLIC 11

Page 18: Guide Ux ORA upgrade

3 Preparation

3.4 Checking the Prerequisites for the Oracle Universal Installer

SQL> exit

ResultYou can check the results of the pre-upgrade script by looking at the log file /tmp/pre_upgrade.log.

.Caution

Make the changes listed in the log file, otherwise you might have problems during the upgrade.

3.4 Checking the Prerequisites for the Oracle Universal Installer

You must check the prerequisites for the Oracle Universal Installer (OUI).

Procedure

1. Log in as the Oracle user ora<dbsid>.2. Execute the following commands:n 32-bit platforms:

cd /oracle/stage/102_32/database

./runInstaller –executeSysPrereqs

n 64-bit platforms, one of the following:

l cd /oracle/stage/102_64/database

./runInstaller –executeSysPrereqs

l cd /oracle/stage/102_64/database/Disk1

./runInstaller –executeSysPrereqs

If the OUI complains that the operating system version is not certified or supported, you can ignore this.If OUI reports missing OS patches, you need to apply these before you can continue.

3.5 Checking the SAP System Prerequisites

You must check the prerequisites for the SAP system (ABAP) release 6.40 and lower. You need to:

1. Update the database library (dbsl) to the latest patch level2. Apply a correction to the ABAP system

This is necessary to make the SAP system compatible for the Oracle Database 10g release checks.3. If the SAP kernel uses the Oracle 9.2 client software (this is the case if you use the 640 or EXT kernels), you

also need to update the Oracle client software to at least release 9.2.0.7. If you do not update the Oracle 9.2client software you might get core dumps in the SAP system after the upgrade to Oracle Database 10g.

4. You need to execute an SQL script that creates a new role on the database. This is necessary due to changesto the Oracle CONNECT role in Oracle 10.2.

5. You must upgrade Java systems to at least Service Pack 13 before you can upgrade to Oracle Database 10g.

12 PUBLIC 08/28/2006

Page 19: Guide Ux ORA upgrade

3 Preparation

3.6 Migrating to Automatic Undo Management

Procedure

1. Download the latest version of dbsl (dboraslib.so, dboraslib.sl, or dboraslib.o) for your releasefrom the SAP Service Marketplace at:service.sap.com/swdc

2. Check the level of your Basis support package using this table:

SAP Release (SAP_BASIS) Basis Support Package Level

46B SAPKB46B57

46C SAPKB46C48

46D SAPKB46D38

6.10 SAPKB61041

6.20 SAPKB62044

6.40 SAPKB64009

n If the level of your Basis support package is higher than or equal to that shown above, no additionalcorrections are necessary.

n If the level of your Basis support Package is lower than the one shown in the table above, you need toapply an additional transport correction to your system as described in SAP Note 868681.

3. Download the latest version of the Oracle Client software ‒ OCL92064.SAR or OCL92032.SAR ‒ from SAPService Marketplace at:service.sap.com/swcenter-3pmain

This is described in SAP Note 886783.Make sure that you install the newest version of the Oracle client software on all application servers,including the database server if there is an SAP application running on the database server.

.Note

If you cannot update the client software because there are several other application servers running onthe same host, see SAP Note 964783.

4. Execute the SQL script sapconn_role.sql as follows:cp /oracle/stage/102_64/database/SAP/sapconn_role.sql $ORACLE_HOME/dbs

or:cp /oracle/stage/102_64/database/Disk1/SAP/sapconn_role.sql $ORACLE_HOME/dbs

cd $ORACLE_HOME/dbs

sqlplus /nolog @sapconn_role

3.6 Migrating to Automatic Undo Management

This step is only relevant if your database still uses manual undo management (rollback tablespace androllback segments).

08/28/2006 PUBLIC 13

Page 20: Guide Ux ORA upgrade

3 Preparation

3.7 Stopping Statspack Reports

If your database still uses rollback segments for undo management we strongly recommend you to migrateto automatic undo management before starting the database update to Oracle database 10g. Otherwise youmight run into errors.

Procedure

1. Read SAP Note 600141, which is the central note describing automatic undo management. This note alsogives you an overview of the concepts involved.

2. Follow the step-by-step instructions in the note to migrate to automatic undo management.

3.7 Stopping Statspack Reports

This step deletes the Statspack jobs with DBMS_JOB.REMOVE.

PrerequisitesThis step is only relevant if the Statspack package has been activated on the database for monitoring purposes.For more information on Statspack, see SAP Note 717484.

Procedure

1. Log on as the user under which the statspack jobs run (usually PERFSTAT):SQL> connect PERFSTAT/<pwd>

SQL> select job, what from user_jobs;

This displays a list of the jobs that are currently entered under the user PERFSTAT.2. Delete all jobs with the print job number <jobnr>:

SQL> connect PERFSTAT/<pwd>

SQL> execute dbms_job.remove( <jobnr> );

3.8 Checking the SYSTEM and SYSAUX Tablespace for Freespace

You need to make sure that the SYSTEM and SYSAUX tablespaces have at least 750 MB freespace. This isnecessary due to a bug in the Oracle database that can cause the Oracle Database Upgrade Assistant (DBUA) tounderestimate the required freespace.

.Note

The SYSAUX tablespace is available only if the source database is already Oracle 10.1.If your source database is Oracle 9.2, there is no SYSAUX tablespace. In this case you can ignore references

to the SYSAUX tablespace in this section.

ProcedureCheck if the SYSTEM or SYSAUX tablespace have enough freespace.You can check this by executing one of the following commands as the ora<dbsid> user:

14 PUBLIC 08/28/2006

Page 21: Guide Ux ORA upgrade

3 Preparation

3.9 Checking for Invalid Database Objects

n brspace –f dbshow –c tsinfo –s SYSTEM

n brspace –f dbshow –c tsinfo –s SYSAUX

If the free space is less than 750 MB, use your preferred database administration tool to increase the size by usingone of the following options:

n Setting the AUTOEXTEND option for the existing datafile to ON.n Adding an additional datafile.n Resizing the existing datafile.

.Note

For systems that use raw devices for the datafiles, the AUTOEXTEND option might not work because ofthe fixed size of the raw devices. In this case you might need to add another datafile by adding a newvolume or partition on the operating system.

3.9 Checking for Invalid Database Objects

This optional step lets you check if there are any invalid database objects before the database upgrade to Oracledatabase 10g starts. After the upgrade it helps you distinguish database objects that have become invalid due tothe upgrade process from those that were already invalid to start with.

Procedure

1. Execute the following commands:SQL> spool invalid_objects

SQL> select unique object_name, object_type, owner from dba_objects where status =

'INVALID';

SQL> @?/rdbms/admin/utlrp.sql

SQL> select unique object_name, object_type, owner from dba_objects where status =

'INVALID';

SQL> spool off

A list of invalid objects before the upgrade is now generated.2. Check the list of invalid objects after the upgrade.

If any objects in the list from before the upgrade are also in the list of invalid objects after the upgrade, youcan be sure that this is not due to the upgrade process.

3.10 Installing the Oracle Instant Client

You have to extract the Oracle Instant Client software. This is necessary if the JDBC driver location [page 37] refersto the Oracle Instant Client directory, rather than to the Oracle home directory.The Instant Client is also needed for BR*TOOLS Release 700, which you install during the post-upgrade

phase.

08/28/2006 PUBLIC 15

Page 22: Guide Ux ORA upgrade

3 Preparation

3.10 Installing the Oracle Instant Client

ProcedureInstall the Oracle Database 10g Instant Client for UNIX as described in SAP Note 819829.

16 PUBLIC 08/28/2006

Page 23: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4 Oracle Database Upgrade

This section describes how to upgrade the Oracle database.

Prerequisites

You have completed the following:

n Planning [page 5]n Preparations [page 9]

Process Flow

You install the database software [page 17].You upgrade the database structure [page 24].

Result

You have completed the upgrade. Now perform the post-upgrade steps [page 17].

4.1 Database Software Installation

As part of the Oracle database upgrade [page 17] you upgrade the software.

.Note

You can upgrade the database software while the SAP system is still running with the existing database(that is, Oracle 8.1.7 or Oracle 9.2). Therefore, to reduce downtime you can perform the following stepsbefore you stop your system. The exception to this is for AIX where you need to run an additional scriptas the root user, as described in Adapting the AIX Kernel (AIX only) [page 20]. You need to shut down allOracle instances on the host before running this script.

Process Flow

1. You check and set the environment variables [page 18].2. You back up the Oracle inventory [page 20].

3.

Only valid for: AIX

You perform steps for the AIX operating system [page 20].End of: AIX

4. You run the Oracle Universal Installer [page 21].5. You install the current patch set [page 22].6. You install required interim patches [page 22].7. You copy and adapt the old Oracle SQL*Net files [page 23].8. You back up the Oracle database [page 24].9. You shut down the SAP system and Oracle listener process [page 24].

08/28/2006 PUBLIC 17

Page 24: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.1 Database Software Installation

4.1.1 Checking and Setting the Environment Variables

To install the database software [page 17], you need to check and set the environment variables of user ora<dbsid>because this user installs the Oracle software.

.Note

For more information on changes to the environment of the SAP user <sapsid>adm, see Changing theEnvironment for the <sapsid>adm User [page 36].

PrerequisitesYou set the environment variables below by editing the files .dbenv_<host>.sh and .dbenv_<host>.csh

in the home directory of ora<dbsid>.

.Caution

Do notmake the changes to the environment permanent as long as the old database is still running. Youmake them permanent in the post-upgrade phase. We recommend you to back up the old environmentfiles before making the changes permanent.

Procedure

1. Make sure the following environment variables are not set:

n TWO_TASK

n ORA_NLS

n ORA_NLS32

n ORA_NLS33

2. Set the following environment variables:

Environment Variable Value

DISPLAY <hostname>:0.0

.Note<hostname>:0.0 is the host on which the OracleUniversal Installer (OUI) will be displayed.

ORACLE_BASE /oracle

ORACLE_SID <DBSID>

ORACLE_HOME One of the following values:/oracle/<DBSID>/102_32

/oracle/<DBSID>/102_64

18 PUBLIC 08/28/2006

Page 25: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.1 Database Software Installation

Environment Variable Value

NLS_LANG Set this to the output of the script CHECKS.SQL, whichyou can find in one of the following:n 64-bit platforms

/oracle/stage/102_64/database/Disk1/SAP

or/oracle/stage/102_64/database/SAP

n 32-bit platforms/oracle/stage/102_32/database/SAP

.NoteThe database must be open before you execute thescript CHECKS.SQL.

ORA_NLS10 $ORACLE_HOME/nls/data

SAPDATA_HOME /oracle/<DBSID>

The setting of the DISPLAY environment variable is described in SAP Note 432861.To make sure that the OUI screen can be displayed correctly on your system, you might have to start an Xterminal (xterm) session and run the command:$ xhost +

3. Set the corresponding environment variable for the library path:

Operating System Environment Variable Value

AIX LIBPATH $ORACLE_HOME/lib:$LIBPATH

Solaris, HP Tru64 UNIX, Linux LD_LIBRARY_PATH $ORACLE_HOME/lib:$LD_LIBRARY_PATH

HP-UX SHLIB_PATH $ORACLE_HOME/lib:$SHLIB_PATH

This makes sure that dynamic libraries are loaded first from $ORACLE_HOME/lib.4. Include $ORACLE_HOME/bin in your PATH or path variable, where $ORACLE_HOME is the variable that you

set in step 2 above.

.Note

Make sure there is only one $ORACLE_HOME/bin in your PATH or path variable. Make sure that the pathvariable does not contain the old $ORACLE_HOME/bin.

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

.Recommendation

You can check the correctness of the new environment with the UNIX env command. Or you can runthe UNIX umask command and check that the returned value is 22.

08/28/2006 PUBLIC 19

Page 26: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.1 Database Software Installation

4.1.2 Backing Up the Oracle Inventory

Before you install the database software [page 17] you need to back up the Oracle inventory.

Procedure

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

n /var/opt/oracle/oraInst.loc

n /etc/oraInst.loc

The location is shown as follows:inventory_loc=<path to Oracle inventory>

2. Make a backup of your existing Oracle inventory before you start the Oracle Database 10g Release 2 (10.2)software installation.

Only valid for: AIX

4.1.3 Performing Steps for the AIX Operating System

To install the database software [page 17] on the AIX operating system, you need to run the rootpre.sh script toadapt the AIX kernel and also execute a command as the root user.

PrerequisitesIf several Oracle instances run on one computer, you must shut these down before adapting the kernel.

Procedure

1. Run the rootpre.sh script as follows:a) Log on to the system with user ora<dbsid> if you are not already logged on.b) Change to the directory /oracle/stage/102_32/database/Disk1/rootpre using the following

command:cd /oracle/stage/102_32/database/Disk1/rootpre

c) Make sure that the user root is assigned the environment of ora<dbsid>:su root

d) Call the script rootpre.sh:./rootpre.sh

e) Log off with the user root:exit

2. Remove any currently unused modules in kernel and library memory by entering the following commandas user root:# /usr/sbin/slibclean

End of: AIX

20 PUBLIC 08/28/2006

Page 27: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.1 Database Software Installation

4.1.4 Running the Oracle Universal Installer

To install the database software [page 17] you run the Oracle Universal Installer (OUI).

Procedure

1. Start the OUI with the user ora<dbsid> as follows:n For 32-bit systems, enter the following:

cd /oracle/stage/102_32/database/SAP

./RUNINSTALLER

n For 64-bit systems, enter one of the following:

l cd /oracle/stage/102_64/database/Disk1/SAP

./RUNINSTALLER

l cd /oracle/stage/102_64/database/SAP

./RUNINSTALLER

You see a message that a response file is being generated. It might take several minutes before you seethe OUI screen.

2. Respond to the OUI as follows:

Prompt or Condition Action

When you run the OUI for the first time on this host, adialog box, Specify File Locations Destination..., appears.This dialog box proposes the inventory location as/oracle/oraInventory and the installation group as dba.

Accept the OUI proposal and continue by choosing Next.

Available Product Components Confirm the default selections by choosing Next.

Product-Specific Prerequisite ChecksThis phase checks if all necessary requirements forinstalling and running the database have been met.

For items that are flagged as warnings or failed, reviewthe cause for the warning or failure on screen and fix theproblem if possible.Alternatively you can verify the items manually andconfirm them by clicking the checkbox. You can finddetails about each check by clicking on the relevant item.

Java Development Kit (JDK) HP Tru64: Enter the location of the JDK.

Summary page Check the information on this page and then start theinstallation.

When the Install step has completed, a dialog boxappears.

Execute the file $ORACLE_HOME/root.sh with the userroot, and confirm the dialog box by choosing OK.If this is the first time that the Oracle software has beeninstalled on this host, the OUI also asks you to execute asecond script, /oracle/oraInventory/orainstRoot.sh, asthe root user. Execute this script as well.Continue by choosing Next.

3. At the end of the installation, in case there are any Configuration Assistants that have been startedautomatically (for example, Oracle Net) choose Cancel and terminate the Net Config Assistant. You canignore messages that some of the config assistants failed to complete successfully.

08/28/2006 PUBLIC 21

Page 28: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.1 Database Software Installation

The Installer finishes, reporting that the Oracle installation was successful. It also informsyou about the services that it started. You can find the port numbers for these services in the$ORACLE_HOME/install/portlist.ini file.

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

.Note

You can now access the Oracle 10.2 online documentation, which was installed during the last step.You can find the entry point to the Oracle online documentation at $ORACLE_BASE/doc/index.htm.

4.1.5 Installing the Current Patch Set

After the database software installation [page 17] , you need to install the current Oracle Database 10g Release2 (10.2) patch set.

Prerequisites

n For more information on the latest patch set available for Oracle 10.2 see SAP Note 871735.n For more information on how to install the patch set, see the patch set README file.

.Caution

Do not perform any of the post-installation steps mentioned in the patchset README file. Thepost-installation steps are to be performed only on an existing Oracle 10.2 database.At this stage you have only installed the Oracle 10.2 software. The database itself is still not Oracle 10.2.Therefore, make sure that you do not perform the post-installation steps mentioned in the README file.

n You only have to install the latest (that is, the current) patch set.

Procedure

1. Log on at the operating system level with the ora<dbsid> user.2. Install the patch set as described on the patch set README file.

4.1.6 Installing Required Interim Patches

After the database software installation [page 17], you need to install required interim patches, using the Oracle toolOPatch. You need these interim patches in addition to the current patch set.

Prerequisites

n Make sure you have already installed the current patch set [page 22].n Check SAP Note 871096 to find the list of required patches to be installed.

22 PUBLIC 08/28/2006

Page 29: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.1 Database Software Installation

n Check SAP Note 839182 for instructions on how to use OPatch.

Procedure

1. Log on at the operating system level as the ora<dbsid> user.2. Install the patches, following the instructions in SAP Note 839182.

.Note

You can apply the patches in any order.We recommend that you first copy the patches to a directory called ora_patches in $ORACLE_HOME.

3. After all the patches have been successfully applied, you can query the status with the following command:$ORACLE_HOME/OPatch/opatch lsinventory

This command lists all the patches that have been applied to the software installation.

4.1.7 Copying and Adapting the SQL*Net Files

After the database software installation, youmust copy andmodify the old SQL*Net files, that is, listener.ora,sqlnet.ora, and tnsnames.ora.

Procedure

1. Log on as user ora<dbsid>.2. If ora<dbsid> has environment variable TNS_ADMIN set, do the following:

a) Choose a new location for the new SQL*Net parameter files and set TNS_ADMIN to point to the newlocation <new_TNS_ADMIN>.

b) Copy the SQL*Net parameter files from the old location <old_TNS_ADMIN> to <new_TNS_ADMIN>

c) Edit the new SQL*Net files by adapting all file paths for the new directory. Be sure to adapt the value ofORACLE_HOME in the listener.ora file.

3. If ora<dbsid> has not set the TNS_ADMIN environment variable, Oracle first searches in /etc, in$ORACLE_HOME/network/admin for the SQL*Net parameter files. Choose which of the following applies toyour installation:n The SQL*Net parameter files are located in directory /etc:

a) Make a backup copy of the files.b) 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.n The SQL*Net parameter files are located in <old_ORACLE_HOME>/network/admin:

a) Copy the SQL*Net parameter files from <old_ORACLE_HOME> to <new_ORACLE_HOME>.b) 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. Since your database is still running in the old environment, do not start the listener with the new

listener.ora file at this point.

08/28/2006 PUBLIC 23

Page 30: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.2 Database Structure Upgrade

4.1.8 Backing Up the Oracle Database

Youmust have a complete and usable database backup otherwise you might lose data.We recommend you to back up all your Oracle 9i archive logs before you start the upgrade. The upgrade

changes the parameter log_archive_format to 10.2.0. After the upgrade has completed BRARCHIVEcannot back up archive files from before the upgrade (that is, from Oracle 9i or earlier) because of this changeto log_archive_format.

Procedure

1. Create a complete database backup and back up any archive logs from Oracle 9i.

.Recommendation

Before backing up the archive logs, switch the log files with the following SQL command:alert system switch logfile

Make sure that you do a log file switch for all online redo log files.

2. Check that the backup is usable. If for any reason you have problems during the upgrade you must be ableto restore the database from this backup.

3. If you want to separate the alert log file of Oracle 9i from that of Oracle Database 10g Release 2 (10.2), youcan move the alert log file to a different name with the following command:cd /oracle/<DBSID>/saptrace/background

mv alert_<SID>.log alert_<SID>.log-SV-9.2.0

4.1.9 Shutting Down the SAP System and Oracle Listener Process

You need to shut down the SAP system and the Oracle listener running process running in the oldORACLE_HOME, for example, in /oracle/<DBSID>/920_64.

Procedure

1. Stop the SAP application server by entering the following command as user <sapsid>adm:stopsap r3

2. Stop the Oracle listener by entering the following command as user ora<dbsid>:lsnrctl stop

.Note

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

4.2 Database Structure Upgrade

As part of the Oracle database upgrade [page 17] you upgrade the database structure.

24 PUBLIC 08/28/2006

Page 31: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.2 Database Structure Upgrade

Prerequisites

You have installed the database software [page 17].

Process Flow

1. You check the oratab entry [page 25].2. You start the Database Upgrade Assistant to perform the upgrade [page 25].

Result

Now continue with the Post-Upgrade Steps [page 29].

4.2.1 Checking the oratab Entry

To upgrade the database structure [page 24] , you need to check the entry for the oratab file.

PrerequisitesYou can find the oratab file as follows:

n

Only valid for: AIX;HP Tru64 UNIX;HP-UX;Linux

/etc

End of: AIX;HP Tru64 UNIX;HP-UX;Linux

n

Only valid for: Solaris

/var/opt/oracle

End of: Solaris

Procedure

1. Make sure that the oratab file contains the following entry:<DBSID>:<old_ORACLE_HOME>:N

Where old_ORACLE_HOME stands for the path to the old oracle software installation.

.Example

The entry for a system with a <DBSID> equal to C11 is as follows:C11:/oracle/C11/920_64:N.

2. If this entry does not exist, insert it using a text editor.

4.2.2 Starting the Database Upgrade Assistant

To upgrade the database structure [page 24] you need to start the Oracle Database Upgrade Assistant (DBUA). TheDBUA tool is a graphical tool that leads you step by step through the upgrade.

08/28/2006 PUBLIC 25

Page 32: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.2 Database Structure Upgrade

Prerequisites

.Caution

Make sure that you start the DBUA in the Oracle 10.2 user environment. To do this, carefully checkthe first point below.

n Confirm that the following environment variables point to Oracle 10.2 directories:l ORACLE_HOME points to /oracle/<DBSID>/102_64

l PATH

l ORA_NLS10

l LD_LIBRARY_PATH orSHLIB_PATH or LIBPATHn Before you start the DBUAmake sure that the DISPLAY environment variable is correctly set.

Procedure

1. You start the DBUA:cd $ORACLE_HOME/bin

./dbua

2. Respond appropriately to the DBUA dialogs:TheWelcome screen provides information about the upgrade assistanta) Choose Next to continue.

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

The DBUA now analyzes the database to be upgraded, performs pre-upgrade checks, and issueswarnings if necessary. You can ignore warnings about the following:n Stale optimizer statisticsn Changes to the Oracle CONNECT roleYou need to analyze and act on other warnings.

.Recommendation

We recommend you to resolve warnings other than those listed above. Otherwise you mightlater have problems during the actual upgrade.

The SYSAUX Tablespaces screen lets you modify the attributes for the SYSAUX tablespace, which is addedautomatically to all new Oracle Database 10g databases.

c) Make the following entries:n Datafile Path: $SAPDATA_HOME/sapdata1/sysaux_1/sysaux.data1

.Note

Make sure that you substitute the value for $SAPDATA_HOME with the full path name ‒ forexample, /oracle/<DBSID> ‒ in the above command.You cannot use environment variables directly in the input field since the DBUA cannotevaluate SAP-specific environment variables.

n Select Reuse Existing File Name.

26 PUBLIC 08/28/2006

Page 33: Guide Ux ORA upgrade

4 Oracle Database Upgrade

4.2 Database Structure Upgrade

n Enter 1000 MB in Size.

n Select AUTOEXTEND ON.

n Enter 100 MB in Increment.

n Enter 2000 MB inMaximum Size.The Recompiling Invalid Objects screen lets you choose whether the DBUA has to automaticallyrecompile all PL/SQLmodules after the upgrade. If the database server has multiple CPUs, the DBUAautomatically proposes the number of parallel processes to be used for the recompilation.The turn off archiving option means that archiving is switched off for the duration of the upgradeso that the upgrade finishes faster.

d) Accept the default values, select Recompile invalid objects after the upgrade, turn off archiving for the durationof the upgrade, and choose Next.The Backup screen lets you specify whether you want the DBUA to back up the database.

e) Since you have already backed up the database, select I have already backed up my database and choose Next.TheManagement Options screen lets you set up the database so that it can be managed with the EnterpriseManager.

f) 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 warningsthat you ignored or did not fix, components to be upgraded, parameters to be added, removed, andchanged after the upgrade.

3. Review the summary of changes and choose Back to make any final adjustments, if required.

.Note

For a complete list of obsolete and deprecated parameters, see the documentation for Oracle Database10g Release 2 (10.2).

4. Start the database upgrade by choosing Finish.The DBUA automatically removes the database initialization parameters that are now obsolete in OracleDatabase 10g Release 2 (10.2).The upgrade process itself runs for some time, depending mainly on the size of the database and thecapacity 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.

08/28/2006 PUBLIC 27

Page 34: Guide Ux ORA upgrade

This page is intentionally left blank.

Page 35: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5 Post-Upgrade Steps

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

1. You finalize the environment of the ora<dbsid> user [page 29].2. You check the upgraded database [page 29].3. You update BR*Tools [page 31].4. You back up the database [page 31].5. You perform post-upgrade tasks [page 32].6. You install Oracle critical patch updates [page 34].7. You check the oratab entry [page 34].8. You start the listener process [page 35].9. You rename the old $ORACLE_HOME/bin directory [page 35].10. You check the read authorization of the <sapsid>adm user [page 35].11. You change the environment for the <sapsid>adm user [page 36].12. You check the SAP profile parameters [page 36].13. You change the location of the JDBC driver [page 37].14. You restart the SAP system [page 39].15. You disable the database user locking mechanism on failed logins [page 39].16. You configure the new features for Oracle Database 10g Release 2 (10.2) [page 39].

5.1 Finalizing the Environment of the ora<dbsid>User

You need to make sure that the changes you made to the Oracle user environment are permanently stored inthe profiles (.cshrc, .dbenv_<hostname>.csh, and so on).

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

.Note

Make sure that the environment does not contain any variables that still refer to the old database release.

5.2 Checking the Upgraded Database

You need to check the upgraded database.

08/28/2006 PUBLIC 29

Page 36: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.2 Checking the Upgraded Database

Procedure

1. Check that the database is now running with Oracle Database 10g Release 2 (10.2) software in an OracleDatabase 10g Release 2 (10.2) environment by entering the following commands:a) Log onto the database as the ora<sid> user.b) Enter the following command to start SQLPLUS:

sqlplus / as sysdba

c) Enter the following SQL commands:A) Enter the following command to determine the release of the installed software:

SQL> select version from V$INSTANCE;

.Example

This is an example of the output from this command:VERSION

10.2.0.2.0

B) Enter the following command to determine the release and status of the installed databasecomponents:SQL> select comp_id, version, status from dba_registry;

.Example

This is an example of the output from this command:COMP ID VERSION STATUS

CATALOG 10.2.0.2.0 VALID

CATPROC 10.2.0.2.0 VALID

Make sure that the command returns the status VALID.C) Check that the version returned in the previous two commands is identical.

2. Check that the value for the version returned from the above command is the same level as the installedpatchset.For example, if the installed patchset is Oracle 10.2.0.2, the above command should also report the versionfor the CATALOG and CATPROC components as 10.2.0.2.

3. After the upgrade check that the following document is created:$ORACLE_HOME/assistants/dbua/doc/help/DefaultBehaviorChangesin10g.html

.Note

You need to check this document carefully because it contains information on important changes inthe default behavior of the new Oracle 10.2 database.

.Recommendation

If the old database used an initialization file init<DBSID>.ora, theDBUA automatically creates an spfile.We recommend that you continue to use the spfile. Do not switch back to the initialization file afterthe upgrade.

30 PUBLIC 08/28/2006

Page 37: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.3 Updating BR*Tools

5.3 Updating BR*Tools

You update BR*Tools to the latest release, BR*Tools Release 700, with the latest patch level. After extractingBR*Tools Release 700 you need to update the SAPDBA role using the script sapdba_role.sql. This is essentialso that the new release of BR*Tools works correctly. The script is automatically extracted when you extractBR*Tools.

Procedure

1. Download the most current version of the BR*Tools from SAP Service Marketplace at:service.sap.com/swdc

2. After you have extracted the newest BR*Tools, you also need to copy the BR*Tools configuration filesinit<DBSID>.sap and init<DBSID>.utl from the old $ORACLE_HOME/dbs directory to the new one(init<DBSID>.utl is only available if you are using a third-party backup solution):cd <old $ORACLE_HOME>/dbs

cp init<DBSID>.sap $ORACLE_HOME/dbs

cp init<DBSID>.utl $ORACLE_HOME/dbs

.Note

init<DBSID>.dba is no longer needed because BR*Tools release 6.40 SAPDBA is no longer available.

3. Execute the following commands as the ora<dbsid> user to update the SAPDBA role:cp /usr/sap/<SAPSID>/SYS/exe/run/sapdba_role.sql $ORACLE_HOME/dbs

cd $ORACLE_HOME/dbs

Only valid for: ABAP

sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>

End of: ABAP

Only valid for: Java

sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>DB

End of: Java

.Note

If you have an ABAP+Java system, you have to enter both commands.

.Caution

Make sure that you execute this command for every SAPSCHEMA_ID in your database.

5.4 Backing Up the Database

You need to back up your upgraded Oracle Database 10g database.

.Caution

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

08/28/2006 PUBLIC 31

Page 38: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.5 Performing Post-Upgrade Tasks

ProcedurePerform a full database backup.

5.5 Performing Post-Upgrade Tasks

You need to perform certain post-upgrade tasks.

Procedure

1. Change database compatibility by executing the following SQL command as the ora<dbsid> user:SQL> alter system set compatible='10.2.0' scope = spfile;

2. Restart the Oracle database.3. Deactivate the Oracle recycle bin by executing the following SQL command as the ora<dbsid> user:

SQL> purge dba_recyclebin;

SQL> alter system set recyclebin = 'off' scope = spfile;

For more information, see SAP Note 838982.4. Gather Oracle optimizer statistics as follows:

a) Execute the following commands as the ora<dbsid> user:SQL> spool $ORACLE_HOME/cfgtoollogs/dbstats.log

SQL> execute dbms_scheduler.disable('GATHER_STATS_JOB');

SQL> execute dbms_stats.gather_system_stats;

SQL> execute dbms_stats.gather_dictionary_stats

(ESTIMATE_PERCENT => NULL,

METHOD_OPT => 'FOR ALL COLUMNS SIZE AUTO',

GRANULARITY => 'ALL',

CASCADE => TRUE,

OPTIONS => 'GATHER',

NO_INVALIDATE => FALSE);

SQL> execute dbms_stats.gather_fixed_objects_stats;

b) Check the log file dbstats.log created at $ORACLE_HOME/cfgtoollogs for any errors during thegathering of statistics.

5. Identify the objects that are invalid after the upgrade as follows:a) Execute the following commands as the ora<dbsid> user:

SQL> @?/rdbms/admin/utlrp.sql;

SQL> spool $ORACLE_HOME/cfgtoollogs/invalid_post.log

SQL> select count(*) from dba_objects where status = 'INVALID';

SQL> select substr(owner,1,12) owner, substr(object_name,1,30)

object, substr(object_type,1,30) type, status from

dba_objects where status <>'VALID' order by owner;

SQL> spool off;

b) Check the log file invalid_post.log. created at $ORACLE_HOME/ cfgtoollogs/invalid_post.log tocompare the invalid objects before the start of the upgrade.

6. Check the Oracle database parameters against SAP Note 830576 and adjust them if necessary.

32 PUBLIC 08/28/2006

Page 39: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.5 Performing Post-Upgrade Tasks

Make sure that the following database parameters, if set, are removed;COMMIT_WRITE

CURSOR_SPACE_FOR_TIME

DB_FILE_MULTIBLOCK_READ_COUNT

HASH_JOIN_ENABLED

LOG_ARCHIVE_START

OPTIMIZER_INDEX_COST_ADJ

OPTIMIZER_MODE

STATISTICS_LEVEL

TIMED_STATISTICS

TRACE_ENABLED

7. Restart the database to activate the changes:a) Log on to the database with SQL*Plusb) Execute the following commands:

sqlplus / as sysdba

shutdown immediate

startup

8. Gather statistics for SAP schemas:a) With Oracle Database 10g all tables have statistics, which means that you need to update some entries in

the DBSTATC table before starting BRCONNECT, as follows:n For 32-bit platforms:

sqlplus /nolog

SQL> connect / as sysdba

SQL> @/oracle/stage/102_32/database/SAP/updDBSTATC10.sql

n For 64-bit platforms, do one of the following:

l sqlplus /nolog

SQL> connect / as sysdba

SQL> @/oracle/stage/102_64/database/SAP/updDBSTATC10.sql

l sqlplus /nolog

SQL> connect / as sysdba

SQL> @/oracle/stage/102_64/database/Disk1/updDBSTATC10.sql

b) Update the DBCHECKORA control table after the upgrade as follows:n For 32-bit platforms:

cd /oracle/stage/102_32/database/SAP

sqlplus sap<sid>/<pwd> @dbcheckora10upgr

n For 64-bit platforms, do one of the following:

l cd /oracle/stage/102_64/database/SAP

sqlplus sap<sid>/<pwd> @dbcheckora10upgr

l cd /oracle/stage/102_64/database/Disk1/SAP

sqlplus sap<sid>/<pwd> @dbcheckora10upgr

.Note

Call this script for every SAP ABAP schema on the database

08/28/2006 PUBLIC 33

Page 40: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.6 Installing Oracle Critical Patch Updates

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

.Note

For more information on update statistics, see the documentation SAP Database Guide: Oracle onSAP Service Marketplace at:service.sap.com/dbaora ® Media Library

5.6 Installing Oracle Critical Patch Updates

The Oracle Critical Patch Updates contain a collection of security-related fixes that are released once everyquarter. Since these patches contain important fixes to significant security problems, we strongly recommendyou to apply these Critical Patch Updates.See central SAP Note 850306 for information about the latest CPU to be installed.

Prerequisites

n Make sure you have already installed the current patch set [page 22].n Make sure that you have installed all the required interim patches described in SAP Note 871096.n Check SAP Note 850306 to determine which Oracle CPU is needed.

Procedure

1. Log on at the operating-system level as the ora<dbsid> user.2. Install the patches, following the instructions in the README document of the Critical Patch Update.

Make sure that you complete the post-installation steps described in the README document.

5.7 Checking the oratab entry

You check the entry for the oratab file.

PrerequisitesYou can find the oratab file as follows:

Only valid for: AIX;HP Tru64 UNIX;HP-UX;Linux

/etc

End of: AIX;HP Tru64 UNIX;HP-UX;Linux

Only valid for: Solaris

/var/opt/oracle

End of: Solaris

Procedure

1. Make sure that there is an entry like the following in your oratab file:

34 PUBLIC 08/28/2006

Page 41: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.8 Starting the Listener Process

<DBSID>:<new_ORACLE_HOME>:N

new_ORACLE_HOME indicates the path to the Oracle Database 10g software.

.Example

The entry for a system with <DBSID> equal to C11 is as follows:C11:/oracle/C11/102_64:N.

2. If the entry does not exist, insert it using a text editor.

5.8 Starting the Listener Process

You start the listener process.

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

Procedure

1. Start the listener:lsnrctl start

2. Check that you can remotely connect to the database through the listener:sqlplus SAP<SAPSCHEMA_ID>/pwd@SID

5.9 Renaming the Old $ORACLE_HOME/bin Directory

Once the database is running correctly, you need to rename the bin directory from the old $ORACLE_HOME toprevent accidental usage of the old binaries.

ProcedureRename the old Oracle home directory bin with the following command:

mv <old_oracle_home>/bin <old_oracle_home>/bin-old

.Caution

Do not rename the entire old_oracle_home in case you have SAP systems (SAP kernel release 6.40 andlower) running on the database server. This is because the SAP system running on the database servermight still use the Oracle 9i client software.

5.10 Checking the Read Authorization of the <sapsid>adm User

You check the read authorization of the <sapsid>adm user.

08/28/2006 PUBLIC 35

Page 42: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.11 Changing the Environment for the <sapsid>adm user

Procedure

1. Make sure that the <sapsid>adm user has read authorization for the directory $ORACLE_HOME.2. If this is not true, enter the following command as the ora<dbsid> user:

chmod 755 $ORACLE_HOME

5.11 Changing the Environment for the <sapsid>adm user

You have to change the environment for the <sapsid>adm user, but only on the database server.

.Note

You do not need to change the environment for <sapsid>adm on application servers because SAPapplications still use Oracle9i clients.

Procedure

1. On the database server set the ORACLE_HOME environment variable to point to the location of the OracleDatabase 10g software installation, for example:/oracle/<DBSID>/102_<32>/<64>

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

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

R3trans –d

5.12 Checking SAP Profile Parameters

You have to check the following SAP profile parameters:

n DIR_ORAHOME

n DIR_CLIENT_ORAHOME

n DIR_SERVER_ORAHOME

Procedure

1. Set DIR_ORAHOME and DIR_CLIENT_ORAHOME in the instance profiles to the corresponding values of theORACLE_HOME environment variable of the <sapsid>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 variableof the ora<dbsid> user on the database server.

36 PUBLIC 08/28/2006

Page 43: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.13 Changing the Location of the JDBC Driver

Only valid for: ABAP+Java;Java;Java Add-In

5.13 Changing the Location of the JDBC Driver

If you have an SAP system with Java components, you may have to change the location of the JDBC driver afteryou have upgraded the database. Otherwise the J2EE Engine cannot start because the location of the JDBCdriver still points to the path of the old ORACLE HOME.You change the location of the JDBC driver as follows:

n In files that are located in the database you use the J2EE Engine Config Tool to change the JDBC driverlocation.

n In files that are not located in the database you use Note Pad or another text editor to change the JDBCdriver location.

.Caution

n Make sure when you change the driver location that you use a forward slash "/" or backward slash "\"as appropriate.

n Make sure that you replace the old driver location in all locations stated in the following procedure.

Procedure

1. Change to the config.properties file, which is located in the following directory:

n

Only valid for: Java

/usr/sap/<SAPSID>/JC<instance_number>/j2ee/configtool

End of: Java

n

Only valid for: ABAP+Java;Java Add-In

/usr/sap/<SAPSID>/DVEBMGS<instance_number>/j2ee/configtool

End of: ABAP+Java;Java Add-In

a) Open the file with your text editor and search for the property rdbms.DriverLocation.b) Replace the old driver location with the new one:

/oracle/client/10x_<32/64>/instantclient/<java_class_archive>.jar

where <java_class_archive>.jar is classes12.jar or ojdbc14.jar2. In the same directory as in the first step, start the J2EE Engine - ConfigTool by double-clicking the

configtool.sh file.a) Change to Configuration Editormode.b) Use the Editmode to replace the driver location in the following property sheets that contain the string

rdbms.driverLocation= followed by the driver location:

n cluster_data/Propertysheet instance.properties.IDXXXXXXX/IDXXXXXXX.JavaParameters

where XXXXXXX is the instance number

.Note

Make sure that you change all occurrences. There might be several IDXXXXXX.JavaParametersproperties in the property sheet.

08/28/2006 PUBLIC 37

Page 44: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.13 Changing the Location of the JDBC Driver

n cluster_data/dispatcher/IDXXXX/kernel/propertysheet ConfigurationManager

n cluster_data/server/IDXXXX/kernel/propertysheet ConfigurationManager

where XXXX is the instance number

.Note

If you have more than one server or dispatcher you must modify all relevant property sheets.

c) Close the J2EE Engine - ConfigTool.3. Change to the bootstrap.properties file, which is located in the following directory:

n

Only valid for: Java

/usr/sap/<SAPSID>/JC<instance_number>/j2ee/cluster/bootstrap

End of: Java

n

Only valid for: ABAP+Java;Java Add-In

/usr/sap/<instance_ID>/DVEBMGS<instance_number>/j2ee/ cluster/bootstrap

a) Open the file with your text editor and search for the property rdbms.DriverLocation.b) Replace the old driver location with the new one:

/oracle/client/10x_<32/64>/instantclient/<java_class_archive>.jar

.Caution

If you have more than one J2EE Engine server installed, you must repeat steps 2 and 3 forall servers.

End of: ABAP+Java;Java Add-In

4. Change to the sdmrepository.sdc file, which you can find in the following directory:

n

Only valid for: Java

/usr/sap/<SAPSID>/JC<instance_number>/SDM/program/config/

End of: Java

n

Only valid for: ABAP+Java;Java Add-In

/usr/sap/<SAPSID>/DVEBMGS<instance_number>/SDM/program/config/

a) Search for the following text:<Param type="String" hide="false" name="jarPaths" encrypted="false"

displayName="Driver Paths (separated by ;)">

b) If required, replace the old driver location with the new one, such as one of the following:/oracle/<DBSID>/102_64/jdbc/lib/<java_class_archive>.jar

/oracle/client/10x_<32/64>/instantclient/<java_class_archive>.jar

End of: ABAP+Java;Java Add-In

5. Change to the rdb.properties file, which is located in the following directory:/usr/sap/<SID>/<INSTANCE>/j2ee/deploying

a) Open the file with your text editor and search for the property rdbms.DriverLocation.b) Replace the old driver location with the new one:

/oracle/client/10x_<32/64>/instantclient/<java_class_archive>.jar

6. Change to the templateconfigurator.properties file, which is located in the following directory:

38 PUBLIC 08/28/2006

Page 45: Guide Ux ORA upgrade

5 Post-Upgrade Steps

5.14 Starting the SAP System

/usr/sap/<SID>/<INSTANCE>/j2ee

a) Open the file with your text editor and search for the property RDBMS_DRIVER_LOCATION.b) Replace the old driver location with the new one:

/oracle/client/10x_<32/64>/instantclient/<java_class_archive>.jar

End of: ABAP+Java;Java;Java Add-In

5.14 Starting the SAP System

You need to restart the SAP system.

Procedure

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

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

5.15 Disabling Database User Locking Mechanism For Failed Logins

When upgrading an Oracle database to Oracle version 10g, user locking is automatically activated so that, if yourepeatedly enter invalid login information, the user is locked. By default, ten invalid login attempts are allowedbefore the user is locked. Since old SAP systems first try to log in with a standard user (sapr3) and password,this locking mechanism might lock the user when starting the system.For more information, see SAP Note 951167.

ProcedureTo deactivate user locking after invalid logon attempts, enter the following information in sqlplus:

sqlplus /nolog

sqlplus> ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;

sqlplus> exit

5.16 Configuring the New Features for Oracle Database 10gRelease 2 (10.2)

You need to configure the new Oracle Database 10g Release 2 (10.2) features.

ProcedureFor more information about new features with Oracle Database 10g Release 2 (10.2) see SAP Note 828268. Thisnote provides links to other SAP notes that describe how to configure or activate each new feature.

08/28/2006 PUBLIC 39

Page 46: Guide Ux ORA upgrade

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

© Copyright 2006 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 bechanged without prior notice.