42
Database Upgrade Guide Upgrade to Oracle Database 10g Release 1 (10.1): UNIX Document Version 1.03 – November 7, 2005 For SAP Ramp-Up Only

Ora 101 Unix RampUp 103

Embed Size (px)

Citation preview

Page 1: Ora 101 Unix RampUp 103

D

UDRU

D

F

atabase Upgrade Guide

pgrade to Oracle atabase 10g elease 1 (10.1): NIX

ocument Version 1.03 – November 7, 2005

or SAP Ramp-Up Only

Page 2: Ora 101 Unix RampUp 103

© Copyright 2005 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. Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks 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 and Informix® Dynamic Server

TM are

trademarks of IBM Corp. in USA and/or other countries. ORACLE® is a registered trademark of ORACLE Corporation. UNIX®, X/Open®, OSF/1®, and Motif ® are registered trademarks of the Open Group. Citrix®, the Citrix logo, ICA®, Program Neighborhood ®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java®

is a registered trademark of Sun Microsystems, Inc. J2EE™ is a registered trademark of Sun Microsystems, Inc.

JavaScript® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One. MaxDB™ is a trademark of MySQL AB, Sweden SAP, R/3, mySAP, mySAP.com, SAP NetWeaver, xApps, xApp, 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 in several other countries all over the world. All other

product and service names mentioned are the trademarks of their

respective companies. Data contained in this document serves

information purposes only. National product specifications may vary Disclaimer Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way. Documentation on SAP Service Marketplace You can find this documentation at: service.sap.com/instguides

SAP AG Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.com

Page 3: Ora 101 Unix RampUp 103

Typographic Conventions Type Style Description

Example Text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options.

Cross-references to other documentation

Example text Emphasized words or phrases in body text, graphic titles, and table titles

EXAMPLE TEXT Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE.

Example text Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.

Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.

<Example text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.

EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER.

Icons

Icon Meaning

Caution

Example

Note

Recommendation

Syntax

Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help → General Information Classes and Information Classes for Business Information Warehouse on the first page of any version of SAP Library.

Page 4: Ora 101 Unix RampUp 103

Upgrade to Oracle Database 10g Release 1 (10.1): UNIX

4 November 2005

Upgrade to Oracle Database 10g Release 1 (10.1): UNIX ..............6

1 Checking Requirements for the Upgrade .........................................8 2 Preparations for the Upgrade ..........................................................10

2.1 Checking the Original Version of Your Database.............................. 10 2.2 Reviewing Important Features of the New Release........................... 11 2.3 Checking Hardware Requirements ..................................................... 11 2.4 Checking Software Requirements ...................................................... 11 2.5 Reviewing the Oracle-Specified Kernel Parameters and Shell Limits........................................................................................................... 12 2.6 Checking the Correct UNIX Users, Groups, and Authorizations...... 12 2.7 Checking the Directory Structure ....................................................... 13 2.8 Checking the SAP System Prerequisites ........................................... 14 2.9 Checking the Prerequisites for the Oracle Universal Installer ......... 15 2.10 Migrating to Automatic Undo Management ..................................... 15 2.11 Stopping Statspack Reports ............................................................. 16 2.12 Checking for Invalid Database Objects ............................................ 17 2.13 Backing Up the Oracle Database ...................................................... 17 2.14 Shutting Down the SAP System........................................................ 18 2.15 Shutting Down the Database Processes.......................................... 18

3 Oracle Database Upgrade ................................................................20 3.1 Database Software Installation ........................................................... 20

3.1.1 Checking and Setting the Environment Variables ......................................................21 3.1.2 Checking the Oracle Inventory Location.....................................................................22 3.1.3 Adapting the AIX Kernel (AIX only).............................................................................23 3.1.4 Running the Oracle Universal Installer .......................................................................23 3.1.5 Installing the Current Patch Set ..................................................................................24 3.1.6 Installing Required Interim Patches............................................................................25 3.1.7 Copying and Adapting the SQL*Net Files ..................................................................26 3.1.8 Running the Pre-Upgrade Script.................................................................................26

3.2 Database Structure Upgrade............................................................... 27 3.2.1 Checking the oratab Entry ..........................................................................................27 3.2.2 Performing Final Preparations ....................................................................................28 3.2.3 Starting the Database Upgrade Assistant ..................................................................28

4 Post-Upgrade Steps..........................................................................32 4.1 Checking the Upgraded Database ...................................................... 32 4.2 Changing the Initialization Parameters in the Server Parameter File (spfile) .................................................................................................. 33 4.3 Updating BR*Tools............................................................................... 34 4.4 Updating the SAPDBA and SAPCONN Roles .................................... 34 4.5 Updating the Oracle Database Statistics ........................................... 35 4.6 Backing Up the Database .................................................................... 36 4.7 Checking the oratab Entry................................................................... 36

Page 5: Ora 101 Unix RampUp 103

Upgrade to Oracle Database 10g Release 1 (10.1): UNIX

November 2005 5

4.8 Starting the Listener and the Database.............................................. 36 4.9 Renaming the Old $ORACLE_HOME/bin Directory........................... 37 4.10 Installing the SAP Backup Library or the Legato Storage Manager ...................................................................................................... 37 4.11 Checking the Oracle Database Parameters ..................................... 38 4.12 Checking the Read Authorization of the <sapsid>adm User.......... 38 4.13 Changing the Environment for the <sapsid>adm user ................... 38 4.14 Checking SAP Profile Parameters .................................................... 39 4.15 Installing the Oracle Instant Client ................................................... 39 4.16 Changing the Location of the JDBC Driver...................................... 39 4.17 Restarting the SAP System ............................................................... 41 4.18 Starting BR*Tools as the <sapsid>adm user ................................... 42 4.19 Configuring the New Features for Oracle Database 10g Release 1 (10.1)......................................................................................................... 42

Page 6: Ora 101 Unix RampUp 103

Upgrade to Oracle Database 10g Release 1 (10.1): UNIX

6 November 2005

Upgrade to Oracle Database 10g Release 1 (10.1): UNIX Purpose This documentation explains how to upgrade the Oracle database for the SAP System on the UNIX operating system:

• From Oracle version 9.2.0

• To Oracle Database 10g Release 1 (10.1)

This documentation only covers the upgrade from Oracle 9.2.0.1 or later to Oracle Database 10g Release 1 (10.1).

The Oracle database 10g is not generally released for SAP customers.

Only SAP ramp-up customers can upgrade the database with this documentation.

For more information on the integration of Oracle 10g in the SAP environment, see SAP Note 720886.

If you have Oracle 8.1.7 or an earlier release, you must upgrade to 9.2.0 separately before using this documentation. Direct upgrades from Oracle 8.1.7 to Oracle Database 10g Release 1 (10.1) are supported but not described in this documentation. If you need to upgrade from Oracle 8.1.7 or an earlier release to Database 10g Release 1 (10.1), see the Database 10g Release 1 (10.1) 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.

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

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

• Database system uses Oracle Real Application Cluster (RAC)

• SAP system uses Multiple Components in One Database (MCOD)

Implementation Considerations • For more information on implementation considerations, including the most important

SAP Notes for the upgrade, see Checking Requirements for the Upgrade [Page 8].

Page 7: Ora 101 Unix RampUp 103

Upgrade to Oracle Database 10g Release 1 (10.1): UNIX

November 2005 7

• 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: service.sap.com/notes

• Make sure you are using the Oracle Universal Installer (OUI) shipped with the installation CDs for Oracle Database 10g Release 1 (10.1).

This documentation is only for upgrading Oracle systems running on the UNIX operating system. The documentation for the Windows operating system is separate.

You can find both upgrade documents at:

service.sap.com/instguides -> Other Documentation -> Database Upgrades -> Oracle

Page 8: Ora 101 Unix RampUp 103

1 Checking Requirements for the Upgrade

8 November 2005

1 Checking Requirements for the Upgrade Use You need to check the requirements for the Oracle database upgrade as described in this section.

To upgrade to Oracle Database 10g Release 1 (10.1), your current version must be version 9.2.0 or later.

Procedure ...

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

Number Title Remarks

819830 Oracle Database 10g: Additional Information on upgrade: UNIX

Required late-breaking information

720886 Oracle Database 10g: Integration into the SAP environment

Provides information about integration of Oracle Database 10g Release 1 (10.1) products / options within SAP

828268 Oracle Database 10g: New Features

Provides information about the Oracle Database 10g features which can be used within an SAP environment. Also contains links to notes describing the peocedure to activate some of the new Oracle Database 10g features

830576 Oracle Database 10g: Default / Obsolete Parameters

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

833766 Oracle Database 10g: Software Installation Problems

Describes known software installation problems and their solutions / workaround

824432 Oracle Database 10g: Current Patch Set

Describes the current Oracle patch set

839187 Oracle Database 10g: Patch Set Installation

Describes the installation procedure to install patch sets.

820062 Oracle Database 10g: Patch Sets and Patches

Lists the status of Oracle patch sets and support packages

134592 Update SAPDBA Role Describes how to update the SAPDBA role after the upgrade.

819829 Installation of Oracle 10.x Client software

Required for upgrading Oracle client software to Oracle Database 10g Release 1 (10.1).

142635

Installation of the SAP Backup Library

Required for installation of the SAP backup library and the Legato Storage Manager.

839182 Oracle Database 10g: OPatch Describes how to use Opatch with

Page 9: Ora 101 Unix RampUp 103

1 Checking Requirements for the Upgrade

November 2005 9

Oracle Database 10g Release 1 (10.1)

306408 OPatch Patch Installation Describes how to install an interim patch (this was previously called a one-off patch).

839531 DBUA/Upgrade to Oracle 10.1: ORA -1628

Describes a workaround for a known Oracle bug when upgrading a database with rollback segments

839532 DBUA/Upgrade to Oracle 10.1: ORA -1555

Describes a workaround for a known Oracle bug when upgrading a database with rollback segments

838725 Oracle Database 10g: New Database Statistics

Describes how to create Oracle system and dictionary statistics

868681 Oracle Database 10g: Database release check

Decribes some additional transports to be applied to SAP systems 640 and below before upgrade to oracle database 10g

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:

SAP Release

Note Number

4.6x 156548

6.x 407314

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

Get the Oracle Database 10g Release 1 (10.1) installation guide for your operating system from the Oracle Technology Network www.oracle.com/technology You need this document to review the hardware and software requirements and to configure the kernel parameters and shell limits.

Get the Oracle Database 10g Release 1 (10.1) software and the latest patch sets and required patches.

Get the latest version of the DBATOOLS (BR*Tools) Release 7.00 to be used immediately after the database upgrade from SAP Service Marketplace at:

service.sap.com/swdc

Page 10: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.1 Checking the Original Version of Your Database

10 November 2005

2 Preparations for the Upgrade Purpose You need to prepare for the Oracle database upgrade as described in this section.

Prerequisites You have checked the requirements [Page 8] for the database upgrade.

Process Flow ... ...

1. You check the original version of your database [Page 10].

2. You review important features of the new release [Page 11].

3. You check hardware requirements [Page 11].

4. You check software requirements [Page 11].

5. You review the Oracle-specified kernel parameters and shell limits [Page 12].

6. You checking the correct UNIX users, groups, and authoirzations [Page 12].

7. You check the directory structure [Page 13].

8. You check the SAP system prerequisites [Page 14].

9. You check the prerequisites for the Oracle Universal Installer [Page 15].

10. If required, you migrate to automatic undo management [Page 15].

11. If required, you stop Statspack reports [Page 16].

12. You check the SYSTEM tablespace for freespace [Page 16].

13. If required, you check for invalid database objects [Page 17].

14. You back up the Oracle database [Page 17].

15. You shut down the SAP system [Page 18].

16. You shut down the database processes [Page 18].

Result Now you can upgrade the database [Page 20].

2.1 Checking the Original Version of Your Database To prepare for the database upgrade [Page 10], you need to check the original version of the database you want to upgrade.

This SAP upgrade documentation only covers the standard upgrade from Oracle 9.2.0 or later to Oracle Database 10g Release 1 (10.1) using the Oracle Database Upgrade Assistant (DBUA).

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

• If you are upgrading from Oracle 8.1.7 or an earlier release, read the Oracle Database 10g Release 1 (10.1) upgrade documentation for information on the special steps required.

Page 11: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.2 Reviewing Important Features of the New Release

November 2005 11

• If you upgrade from Oracle 9.2.0 to Oracle Database 10g Release 1 (10.1) in manual mode.

For more information in these special cases, see the Oracle Database 10g Release 1 (10.1) upgrade documentation at: www.oracle.com/technology/documentation

Select the appropriate documentation for Oracle Database 10g Release 1 (10.1).

2.2 Reviewing Important Features of the New Release Use To prepare for the database upgrade [Page 10], we recommend that you review the most important new features of Oracle Database 10g Release 1 (10.1) since some new features might affect the operation of your production system.

Procedure For the complete list of new features, see the new features documentation from Oracle, which you can find at: www.oracle.com/technology/products/database/oracle10g

You need to join Oracle Technology Network to read this.

Oracle Database 10g SQLNET no longer supports ONAMES. If you are using ONAMES instead of TNSNAMES to connect SAP application to the database server you might need to install an Oracle LDAP Server. SAP standard configuration for Oracle SQL*Net is TNSNAMES.

2.3 Checking Hardware Requirements Use To prepare for the database upgrade [Page 10], you need to check that you meet the hardware requirements for running the new Oracle release. The complete list of hardware requirements for every platform is included in the Oracle documentation.

Procedure Get the list of hardware requirements from the relevant Oracle database installation 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 1 (10.1).

2.4 Checking Software Requirements Use To prepare for the database upgrade [Page 10], you need to check that you meet the software requirements for running the new Oracle release. The complete list of software requirements for every platform is included in the Oracle documentation.

Page 12: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.5 Reviewing the Oracle-Specified Kernel Parameters and Shell Limits

12 November 2005

You must make sure that you have the correct version of your operating system and all required patches.

If you need to upgrade your operating system before the database upgrade, make sure that you meet the requirements for the new operating system before starting the database upgrade.

Be sure to complete this procedure before starting the Oracle Universal Installer [Page 23].

Procedure Get the list of software requirements from the relevant Oracle database installation guide for your operating system, which you can find at: www.oracle.com/technology/documentation/

Select the appropriate documentation for Oracle Database 10g Release 1 (10.1).

2.5 Reviewing the Oracle-Specified Kernel Parameters and Shell Limits Use To prepare for the database upgrade [Page 10], you need to review the Oracle-recommended kernel parameters and shell limits for your operating system with Oracle Database 10g Release 1 (10.1).

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.

Procedure Get 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/documentation

Select the appropriate documentation for Oracle Database 10g Release 1 (10.1).

2.6 Checking the Correct UNIX Users, Groups, and Authorizations Use To prepare for the database upgrade [Page 10], you need to check that the ora<dbsid> user has write authorization for the /oracle directory, since the ora<dbsid>.user performs the database installation.

Procedure 1. Enter the following commands:

touch /oracle/write_test

rm /oracle/write_test

Page 13: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.7 Checking the Directory Structure

November 2005 13

If the user ora<dbsid> does not have write authorization, log on to your system with the user root and enter 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

2.7 Checking the Directory Structure Use To prepare for the database upgrade [Page 10], you need to verify the availability and correctness of the following Oracle directories:

• stage directory

• Oracle inventory directory

• Home directory

Procedure 1. Check the Oracle stage directory, usually called /oracle/stage.

This directory might already contain software stages from previous installations or upgrades.

a. For the upgrade to Oracle Database 10g Release 1 (10.1) create the staging directory /oracle/stage/101_64.

b. Make sure that you have around 3 GB of free space in the staging directory. If there is not enough space you can do one or both of the following:

Delete previous stage directories

Extract only the CDs for the database component

c. When the RDBMS CDs have been mounted, use the SAP tool SAPCAR to extract all the RDBMS CDs to /oracle/stage/101_64 as user ora<sid>.

For example, the following command extracts one CD: SAPCAR –xvf OR110164.SAR

After you have finished the extraction, the following sub-directories exist under /oracle/stage/101_64:

db

client

crs

ccd

2. Check the Oracle inventory directory.

Page 14: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.8 Checking the SAP System Prerequisites

14 November 2005

This directory needs to be available and writeable by the Oracle user. It is usually located in the patch mentioned in the oraInst.loc, which you can find under /var/opt/oracle or under /etc.

One of the entries of the orainst.loc points to the location of the Oracle Inventory. The Oracle Inventory contains the record of all the Oracle software installations performed on that host.

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. The Oracle Home directory is normally /oracle/<DBSID>/101_64.

2.8 Checking the SAP System Prerequisites Use To prepare for the database upgrade [Page 10] 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 level.

2. Apply a correction to the ABAP system.

This is necessary to make the SAP system compatible for the Oracle Database 10g release checks.

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.2 client software you might get core dumps in the SAP system after the upgrade to Oracle Database 10g.

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

Procedure 1. Download the latest version of dbsl (dboraslib.so, dboraslib.sl, or

dboraslib.o) for your release from 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

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

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

Page 15: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.9 Checking the Prerequisites for the Oracle Universal Installer

November 2005 15

3. Download the latest version of the Oracle Client software, OCL92064.SAR / OCL92032.SAR, from SAP Service 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.

2.9 Checking the Prerequisites for the Oracle Universal Installer Use To prepare for the database upgrade [Page 10] 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:

• 32-bit platforms: cd /oracle/stage/101_32/db/Disk1

./runInstaller –executeSysPrereqs

• 64-bit platforms: cd /oracle/stage/101_64/db/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.

2.10 Migrating to Automatic Undo Management Use To prepare for the database upgrade [Page 10] this step is only relevant if the database still uses manual undo management (rollback tablespace and rollback segments).

If the database still runs using rollback segments for undo management we strongly recommend you to migrate to automatic undo management before starting the database update to Oracle database 10g. Otherwise you might run into errors.

Procedure 1. Read SAP Note 600141, which is the central note describing automatic undo

management. This note also gives you an overview of the concepts involved.

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

Page 16: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.11 Stopping Statspack Reports

16 November 2005

2.11 Stopping Statspack Reports Use To prepare for the database upgrade [Page 10] this step deletes the Statspack jobs with DBMS_JOB.REMOVE.

Prerequisites This 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> );

2.12 Checking the SYSTEM Tablespace for Freespace Use To prepare for the database upgrade [Page 10] you need to make sure that the SYSTEM tablespace has at least between 500 MB and 750 MB freespace. This is necessary because of a bug in the Oracle Database Upgrade Assistant (DBUA) that can cause it to overestimate the existing freespace.

Prerequisites This step is necessary only if the SYSTEM tablespace has less than 500 MB of freespace. You can check this by executing the following command as the ora<dbsid> user:

brspace –f dbshow –c tsinfo –s SYSTEM

Procedure Extend the SYSTEM tablespace in one of the following ways:

• Set the AUTOEXTEND option for the existing datafile to ON: ALTER DATABASE DATAFILE ’<filename>’ AUTOEXTEND ON;

• Add a new datafile with the AUTOEXTEND ON option: ALTER TABLESPACE system ADD DATAFILE ’<full path of new datafile>’ SIZE 500M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;

• Directly resize the datafile: ALTER DATABASE DATAFILE ’<filename>’ RESIZE <new filesize>

Page 17: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.13 Checking for Invalid Database Objects

November 2005 17

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

2.13 Checking for Invalid Database Objects Use

Use To prepare for the database upgrade [Page 10] this optional step lets you check if there are any invalid database objects before the database upgrade to Oracle database 10g starts. After the upgrade it helps you distinguish database objects that have become invalid due to the 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, you can be sure that this is not due to the upgrade process.

2.14 Backing Up the Oracle Database Procedure To prepare for the database upgrade [Page 10], you must have a complete and useable database backup.

Prerequisites 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.1.0. After the upgrade has completed BRARCHIVE cannot back up archive files from before the upgrade (that is, from Oracle 9i or earlier) because of this change to log_archive_format.

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

Page 18: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.15 Shutting Down the SAP System

18 November 2005

2. Check that the backup is useable. If for any reason you have problems during the upgrade you must be able to restore back the database from this backup.

We strongly recommend you to perform a complete database backup and to check that this backup is useable.

If you do not perform a database backup before you start the upgrade, you might lose data.

2.15 Shutting Down the SAP System Use To prepare for the database upgrade [Page 10], you need to shut down the SAP System.

You must shut down the SAP System before you start the database upgrade.

It is technically possible to keep the SAP application servers running but we recommend strongly that you shut down all SAP application servers before you start the database upgrade.

Procedure • UNIX

To stop the SAP application server, enter the following command as user <sapsid>adm:

stopsap r3

• Windows

Use the Service Manager to stop the SAP application server.

2.16 Shutting Down the Database Processes Use To prepare for the database upgrade [Page 10], Oracle recommends a clean shutdown of the database.

Prerequisites The listener process must be shut down by the user who started it, usually ora<dbsid>. You can check this by entering one of the following commands:

• ps -ef | grep tnslsnr

• ps -axu | grep tnslsnr

Procedure ...

1. Shut down the database: sqlplus /nolog

SQL> connect / as sysdba

SQL> shutdown

Page 19: Ora 101 Unix RampUp 103

2 Preparations for the Upgrade

2.16 Shutting Down the Database Processes

November 2005 19

SQL> exit

2. Stop the listener process: $ORACLE_HOME/bin/lsnrctl stop

3. Determine whether any Oracle processes are still active for this DBSID:

ps -afe | grep <DBSID>

4. Terminate any Oracle processes that are still active.

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

Page 20: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.1 Database Software Installation

20 November 2005

3 Oracle Database Upgrade Purpose This section describes how to upgrade the Oracle database.

Prerequisites You have completed the following:

• Requirements for the Upgrade [Page 8]

• Preparations for the Upgrade [Page 10]

Process Flow ...

1. You install the database software [Page 20].

2. You upgrade the database structure [Page 27].

Result You have completed the upgrade. Now perform post-upgrade steps [Page 32].

3.1 Database Software Installation Purpose As part of the Oracle database upgrade, [Page 20] you upgrade the software.

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 steps before you stop your system. The exception to this is for AIX where you need to run an additional script as the root user, as described in Adapting the AIX Kernel (AIX only) [Page 23]. You need to shut down all Oracle instances on the host before running this script.

Process Flow ...

1. You check and set the environment variables [Page 21].

2. You check the Oracle inventory location [Page 22].

3. You adapt the AIX kernel (AIX only) [Page 23].

4. You run the Oracle Universal Installer [Page 23].

5. You install the current patch set [Page 24].

6. You install required interim patches [Page 25].

7. You copy and adapt the old Oracle SQL*Net files [Page 26].

8. If required, you run the pre-upgrade script [Page 26] ...

Result Now continue by upgrading the database structure [Page 27].

Page 21: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.1 Database Software Installation

November 2005 21

3.1.1 Checking and Setting the Environment Variables Use To install the database software [Page 20], you need to check and set the environment variables of user ora<dbsid> because this user installs the Oracle software.

For more information on changes to the environment of the SAP user <sapsid>adm, see Changing the Environment for the <sapsid>adm User [Page 38].

Prerequisites • You set the environment variables below by editing the files .dbenv_<host>.sh and

.dbenv_<host>.csh in the home directory of ora<dbsid>.

Do not make the changes to the environment permanent in case the old database running is still running. In this case, you have to defer this action until you have started the database in the old environment for the last time, as described in Starting the Database Upgrade Assistant [Page 28].

This is to avoid starting the database in the new environment for Oracle Database 10g by accident (that is, before the database structure upgrade has been completed).

• Back up the old environment files. You need to be able to start the database from the old Oracle enviroment (that is, Oracle 8.1.7 or 9.2) one last time before you start the database structure upgrade.

Procedure ...

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

TWO_TASK

ENV

ORA_NLS

ORA_NLS32

ORA_NLS33

2. Set the following environment variables:

Environment Variable Value

DISPLAY <hostname>:0.0

ORACLE_BASE /oracle

ORACLE_SID <DBSID>

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

/oracle/<DBSID>/101_64

NLS_LANG Set this to the output of the script CHECKS.SQL, which you can find in one of the following:

Page 22: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.1 Database Software Installation

22 November 2005

• 64-bit platforms:

/oracle/stage/101_64/db/Disk1/SAP

• 32-bit platforms:

/oracle/stage/101_32/db/Disk1/SAP

The database must be open before you execute the script 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 Oracle Universal Installer (OUI) screen can be displayed correctly on your system, you might have to start an X terminal (xterm) session and run the command: $ xhost +

3. Set the corresponding environment variable:

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, replacing the existing variable with the new one. Make sure there is only one $ORACLE_HOME/bin in your PATH or path variable.

set path = ($ORACLE_HOME/bin $path)

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

3.1.2 Checking the Oracle Inventory Location Use To install the database software [Page 20], you need to check the location of the Oracle inventory.

Procedure 1. If the Oracle inventory exists, make sure that there is an entry as follows in the file

/var/opt/oracle/oraInst.loc or /etc/oraInst.loc:

inventory_loc=<path to Oracle inventory>

Page 23: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.1 Database Software Installation

November 2005 23

2. If required, you can make a backup of your existing Oracle inventory before you start the Oracle Database 10g Release 1 (10.1) software installation using a command like the following: $ cp –p /oracle/oraInventory /oracle/oraInventory-orig

3.1.3 Adapting the AIX Kernel (AIX only) Use To install the database software [Page 20] on the AIX operating system, you need to run the rootpre.sh script to adapt the AIX kernel.

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

Procedure 1. Log on to the system with user ora<dbsid> if you are not already logged on.

2. Change to the directory /oracle/stage/101_32/db/Disk1 or /oracle/stage/101_64/db/Disk1 using one of the following commands:

cd /oracle/stage/101_32/db/Disk1/rootpre

cd /oracle/stage/101_64/db/Disk1/rootpre

3. Make sure that the user root is assigned the environment of ora<dbsid>:

su root

4. Call the script rootpre.sh:

./rootpre.sh

5. Log off with the user root:

exit

3.1.4 Running the Oracle Universal Installer Use To install the database software [Page 20], you run the Oracle Universal Installer (OUI).

Procedure ...

1. Start the OUI with the user ora<dbsid> as follows:

32-bit systems cd /oracle/stage/101_32/db/Disk1/SAP

./RUNINSTALLER

64-bit systems cd /oracle/stage/101_64/db/Disk1/SAP

./RUNINSTALLER

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

2. Respond to the OUI as follows:

Page 24: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.1 Database Software Installation

24 November 2005

Prompt or Condition Action

Welcome to Oracle Databse 10g Installation

This screen only appears for some platforms.

If you see this screen, select Advanced installation and choose Next.

Specify File Locations Destination...

Check that the variable $ORACLE_HOME is correctly set (that is, it points to the new ORACLE_HOME). Make sure that the relevant directory is empty. Continue by choosing Next.

When you run the OUI for the first time on this host, a dialog box appears.

Execute the file /tmp/orainstRoot.sh as user root, and confirm the dialog box.

Product-Specific Pre-requisite Checks

This phase checks if all necessary requirements for installing and running the database have been met.

For items that are flagged as warnings or manual checks, you have to verify the items manually and confirm them by clicking the checkbox. You find details about each check by simply clicking on the respective item.

Available Product Components

Confirm the default selections by choosing Next.

Java Development Kit (JDK)

HP Tru64: Enter the location of the JDK.

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

When the Install step has completed, a dialog box appears.

Execute the file $ORACLE_HOME/root.sh with the user root, and confirm the dialog box by choosing OK. Continue by choosing Next.

3. At the end of the installation, in case there are any Configuration Assitants that have been started automatically (for example, Oracle Net) choose Cancel and terminate the Net Config Assistant.

The Installer finishes, reporting that the Oracle installation was successful. You can safely ignore messages that some of the config assistants failed to complete successfully.

4. Confirm the dialog box that appears. ...

You can now access the Oracle 10.1 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.

3.1.5 Installing the Current Patch Set Use After the database software installation [Page 20], you need to install the current Oracle Database 10g Release 1 (10.1) patch set.

Prerequisites • For more information on the latest patch set available for Oracle 10.1 see SAP Note

824432.

Page 25: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.1 Database Software Installation

November 2005 25

• For more information on how to install the patch set, see the patch set README file.

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

• After the previous step to install the database software with OUI [Page 23], there is now a new Oracle process, ocssd.bin, running in the background. Before you can apply the patch set, you need to disable this process with the following command, as described in SAP Note 839574:

As user root run run the following command: #cd /oracle/<DBSID>/101_64/bin

#localconfig delete

#exit

Procedure ...

1. Log on at the operating system level with the ora<dbsid> user.

2. Download and extract the patch set as described in SAP Note 824432..

3. Install the patch set as described on the patch set README file.

3.1.6 Installing Required Interim Patches Use After the database software installation [Page 20], you need to install required interim patches, using the Oracle tool OPatch. You need these interim patches in addition to the current patch set.

Prerequisites • Make sure you have already installed the current patch set [Page 24].

• Check SAP Note 820062 to find the list of required patches to be installed.

• Check SAP Notes 839182 and 306408 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.

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.

Page 26: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.1 Database Software Installation

26 November 2005

3.1.7 Copying and Adapting the SQL*Net Files Use After the database software installation [Page 20], you must copy and modify 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 new location <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 of ORACLE_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 to your installation:

The SQL*Net parameter files are located in directory /etc:

i. Make a backup copy of the files.

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

The SQL*Net parameter files are located in <old_ORACLE_HOME>/network/admin:

...

i. Copy the SQL*Net parameter files from <old_ORACLE_HOME> to <new_ORACLE_HOME>.

ii. 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. Proceed as follows, according to whether you database is still running or not:

o If your database is still running in the old environment, you cannot start the listener with the new listener.ora file at this point.

o If your database has been shut down, and you have the new environment, you can start the listener with the new listener.ora using the command

lsnrctl start

3.1.8 Running the Pre-Upgrade Script Use Before you upgrade the database [Page 27], you can optionally run the pre-upgrade script.

This step provide information on installed components and components that will be upgraded if you now run the upgrade.

Page 27: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.2 Database Structure Upgrade

November 2005 27

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

Procedure Execute the following commands: sqlplus /nolog

SQL> connect / as sysdba

SQL> spool /tmp/pre_upgrade.log

SQL> @/oracle/<DBSID>/101_<32/64>/rdbms/admin/utlu101i.sql TEXT

SQL> spool off

SQL> exit

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

3.2 Database Structure Upgrade Use As part of the Oracle database upgrade, [Page 20] you need to upgrade the database structure.

Prerequisites You have installed the database software [Page 20].

Process Flow ...

1. You check the oratab entry [Page 27].

2. You perform final preparations [Page 28].

3. You start the Database Upgrade Assistant [Page 28] to perform the upgrade. ...

Result Now continue with the post-upgrade steps [Page 32].

3.2.1 Checking the oratab Entry Use To upgrade the database structure [Page 27], you need to check the entry for the oratab file.

Prerequisites You can find the oratab file as follows:

• AIX, HP Tru64 UNIX, HP-UX, and Linux

/etc

• Solaris

Page 28: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.2 Database Structure Upgrade

28 November 2005

/var/opt/oracle

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, for example, /oracle/<DBSID>/920_64.

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

3.2.2 Performing Final Preparations Use To upgrade the database structure [Page 27], you need to perform some final preparations in the old user environment.

Prerequisites You have checked the oratab entry [Page 27].

Procedure ...

1. Save the current log for archiving by switching to another log file: sqlplus “/ as sysdba“

SQL> alter system switch logfile

2. Shut down the Oracle 9i database instance: SQL> shutdown immediate;

SQL> exit

3. Shut down the Oracle 9i Listener: lsnrctl stop

4. If not already done, save all the archivelog files that have been generated using BRARCHIVE.

5. If you want to separate the Oracle 9i from the Oracle Database 10g Release 1 (10.1) alert log file, you can move the alert log file to a different name: cd /oracle/<DBSID>/saptrace/background

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

3.2.3 Starting the Database Upgrade Assistant Use To upgrade the database structure [Page 27], 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 • Start up the database in an Oracle 9i environment for the last time. The DBUA expects

that the database to be upgraded is running when it is started. You can start up the database in the Oracle 9i environment with sqlplus:

Page 29: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.2 Database Structure Upgrade

November 2005 29

sqlplus “/as sysdba”

SQL> startup

Make sure that you start up the database in the Oracle 9i environment.

• Switch to the Oracle Database 10g Release 1 (10.1) environment in a separate session. To avoid having to toggle between the Oracle 9i and Oracle Database 10g environments, we recommend that you work with two separate sessions, one with the Oracle 9i environment and the other with the Oracle Database 10g Release 1 (10.1) environment.

• Before you start the DBUA make sure that the DISPLAY environment variable is correctly set.

• Make sure that you are working in the Oracle Database 10g Release 1 (10.1) environment with: echo $ORACLE_HOME

The result needs to be something like:

/oracle/<DBSID>/101_64

Procedure 1. You start the DBUA:

cd $ORACLE_HOME/bin

./dbua –initParam _recyclebin=FALSE

2. Respond appropriately to the DBUA dialogs:

The Welcome screen provides information about the upgrade assistant

a. Choose Next to continue.

The Databases screen lets you select the database to be upgraded.

b. Select the correct database and choose Next.

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

c. Make the following entries:

Datafile Path: $SAPDATA_HOME/sapdata1/sysaux_1/sysaux.data1

Make sure that you substitute the value for $SAPDATA_HOME with the full pathname – for example, /oracle/<DBSID> – in the above command.

You cannot use environment variables directly in the input field since the DBUA cannot evaluate SAP-specific environment variables.

Select Reuse Existing File Name.

Enter 500 MB in Size.

Select AUTOEXTEND ON.

Enter 50 MB in Increment.

Page 30: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.2 Database Structure Upgrade

30 November 2005

Enter 2000 MB in Maximum Size.

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

d. Accept the default values, select Recompile invalid objects after the upgrade, and click 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.

The Management Options screen lets you set up the database so that it can be managed with the Enterprise Manager.

f. Make sure that Configure the database with Enterprise Manager is not selected and click Next.

Before you start it, the DBUA displays a summary of the changes to be made. This includes the 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.

The following parameters are removed because they are obsolete.

• hash_join_enabled

• max_rollback_segments

• row_locking

• transaction_auditing

• log_archive_start

For a complete list of obsolete parameters see the documentation for Oracle Database 10g Release 1 (10.1)g.

4. Start the database upgrade by choosing Finish.

The DBUA automatically removes the database initialization parameters that are now obsolete in Oracle Database 10g Release 1 (10.1). These include the following:

hash_join_enabled

max_rollback_segments

row_locking

transaction_auditing

log_archive_start

For a complete list of obsolete parameters you can check the Oracle database documentation for Oracle Database 10g Release 1 (10.1).

The upgrade process itself runs for som etime, 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.

Page 31: Ora 101 Unix RampUp 103

3 Oracle Database Upgrade

3.2 Database Structure Upgrade

November 2005 31

5. Review the changes made and exit the DBUA.

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

6. Log out from all open sessions and log on again so that the environment variables are refreshed.

7. Check the values for the various environment variables as described in Checking and Setting the Environment Variables [Page 21].

Page 32: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.1 Checking the Upgraded Database

32 November 2005

4 Post-Upgrade Steps Purpose After the Oracle database upgrade, you need to perform the steps described here.

Prerequisites You have finished the Oracle database upgrade [Page 20].

Process Flow ...

1. You check the upgraded database [Page 32]

2. You change the initialization parameters in the server parameter File (spfile) [Page 33].

3. You update BR*Tools [Page 34].

4. You update SAPDBA and SAPCONN roles [Page 34]

5. You update the Oracle database statistics [Page 35].

6. You back up the database [Page 36].

7. You check the oratab entry [Page 36].

8. You start the listener and the database [Page 36].

9. You rename the old $Oracle_HOME/bin directory [Page 37].

10. If required, you install the SAP Backup Library or the Legato Storage Manager [Page 37].

11. You check the Oracle database parameters [Page 38].

12. You check the read authorization of the <sapsid>adm user [Page 38].

13. You change the environment for the <sapsid>adm user [Page 38].

14. You check the SAP profile parameters [Page 39].

15. You install the Oracle Instant Client [Page 39].

16. You change the location of the JDBC driver [Page 39].

17. You restart the SAP system [Page 41].

18. You start BR*Tools as the <sid>adm user [Page 42]

19. You configure the new features for Oracle Database 10g Release 1 (10.1) [Page 42]. ...

Result Your Oracle database is now fully upgraded to the new version.

4.1 Checking the Upgraded Database Use As part of the post-upgrade steps [Page 32], you need to check the upgraded database.

Procedure 1. Check that the database is now running with Oracle Database 10g Release 1 (10.1)

software in an Oracle Database 10g Release 1 (10.1) environment by entering the following commands:

Page 33: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.2 Changing the Initialization Parameters in the Server Parameter File (spfile)

November 2005 33

a. Log into the database as SYSDBA, sap<sid>, system user.

b. Enter the following command to start SQLPLUS: sqlplus / as sysdba

c. Enter the following SQL commands: SQL> select * from v$instance;

SQL> select * from v$database;

SQL> shutdown immediate

SQL> startup

SQL> show parameter spfile

SQL> spool /tmp/post_upgrade.log

SQL> @?/rdbms/admin/utlu101s.sql TEXT

SQL> spool off

SQL> exit

The path of the spfile is shown

2. Check the upgrade status by viewing the post_upgrade.log file.

After the structure upgrade has finished, a document is displayed that shows important new information about Oracle Database 10g.

3. You can view this document from $ORACLE_HOME/assistants/dbma/doc/help/DefaultBehaviorChangesin10g.html

Note that – if the previous database was running with Oracle initialization files (init<SID>.ora) – the DBUA automatically creates a server parameter file (spfile) for the database. For more information on the server parameter file, see SAP Note 601157.

4.2 Changing the Initialization Parameters in the Server Parameter File (spfile) Use As part of the post-upgrade steps [Page 32], you change the compatible parameter so that you can use the full functionality offered by Oracle Database 10g Release 1 (10.1).

Procedure 1. Enter the following command to start SQLPLUS:

sqlplus / as sysdba

2. Display the current values for spfile and compatible:

SQL> show parameter spfile

SQL> show parameter compatible

3. Edit the spfile by running the following commands:

SQL> alter system set compatible=’10.1.0’ scope = spfile;

Page 34: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.3 Updating BR*Tools

34 November 2005

SQL> alter system set optimizer_features_enable=’10.1.0’ scope = spfile;

4. Restart the Oracle instance so that the new parameters take effect and check the alert log during the restart.

4.3 Updating BR*Tools Use As part of the post-upgrade steps [Page 32], you update BR*TOOLS to the latest release. (BR*Tools Release 7.00).

Procedure 1. Download BR*Tools (Release 7.00) from SAP Service Marketplace at:

service.sap.com/swdc

2. After you have the newest BR*Tools you also need to copy the BR*Tools configuration files init<DBSID>.sap and init<DBSID>.utl from the old $ORACLE_HOME/dbs directory to the new one: cd <old $ORACLE_HOME>/dbs

cp init<DBSID>.sap $ORACLE_HOME/dbs

cp init<DBSID>.utl $ORACLE_HOME/dbs

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

4.4 Updating the SAPDBA and SAPCONN Roles Use As part of the post-upgrade steps [Page 32], you need to update the SAPDBA and SAPCONN roles. This is essential so that the newest release of the BR*TOOLS work correctly. You need to apply the scripts sapconn_role.sql and sapdba_role.sql. These scripts are automatically extracted when you extract BR*Tools (Release 7.00).

Procedure Execute the following commands as the ora<dbsid> user:

cd $ORACLE_HOME/dbs

cp /usr/sap/<SAPSID>/SYS/exe/run/sapdba_role.sql .

cp /usr/sap/<SAPSID>/SYS/exe/run/sapconn_role.sql .

sqlplus /nolog @sapconn_role

ABAP systems: sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>

Java systems: sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>DB

Page 35: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.5 Updating the Oracle Database Statistics

November 2005 35

Make sure that you update the SAPDBA role for every SAPSCHEMA_ID in your database.

4.5 Updating the Oracle Database Statistics Use As part of the post-upgrade steps [Page 32] we recommend you to update the Oracle database statistics (that is, segment statistics) for all the SAP schemas in the database.

Procedure 1. Stop automatic statistics collection for all database schemas as follows:

sqlplus / as sysdba

SQL> execute dbms_scheduler.disable(‘GATHER_STATS_JOB’);

2. Gather system statistics with the following command: sqlplus / as sysdba

SQL> execute dbms_stats.gather_system_stats;

System statistics describe some of the hardware characteristics to the query optimizer, which then uses them to estimate CPU and IO costs for queries more accurately.

3. Gather dictionary statistics for schemas SYS and SYSTEM as follows: sqlplus / as sysdba

SQL> execute dbms_stats.gather_dictionary_stats;

4. Gather the fixed object statistics as follows: sqlplus / as sysdba

SQL> execute dbms_stats.gather_fixed_objects_stats;

5. 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: sqlplus SAP<SAPSCHEMA_ID>/<password>

SQL> update DBSTATC set activ = ‘A’ where activ in (‘N’, ‘R’);

SQL> commit;

Perform this action separately for each SAP schema on the database, but not for Java systems.

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

For more information on update statistics, see the documentation SAP Database Guide: Oracle on SAP Service Marketplace at:

service.sap.com/dbaora → Media Library

Page 36: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.6 Backing Up the Database

36 November 2005

4.6 Backing Up the Database Use As part of the post-upgrade steps [Page 32], you back up your upgraded Oracle Database 10g database.

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

Procedure Perform a full database backup.

4.7 Checking the oratab Entry Use As part of the post-upgrade steps [Page 32], you check the entry for the oratab file.

Prerequisites You can find the oratab file as follows:

• AIX, HP Tru64 UNIX, HP-UX, and Linux

/etc

• Solaris

/var/opt/oracle

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

<DBSID>:<new_ORACLE_HOME>:N

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

• If the entry is as follows, substitute <DBSID> for the ‘*’:

*:<new_ORACLE_HOME>:N

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

4.8 Starting the Listener and the Database Use As part of the post-upgrade steps [Page 32], you start the listener process.

Prerequisites Make sure that you have copied the SQL*Net configuration files from the old Oracle installation to the location of the Oracle Datbase 10g software, as described in Copying and Adapting the SQL*Net Files [Page 26].

Procedure 1. Startup the database with the following command:

Page 37: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.9 Directory Renaming the Old $ORACLE_HOME/bin Directory

November 2005 37

Sqlplus / as sysdba

SQL> startup

2. Start the listener: lsnrctl start

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

4.9 Directory Renaming the Old $ORACLE_HOME/bin Directory Use As part of the post-upgrade steps [Page 32], once the database is running correctly, you need to rename the bin directory from the old $ORACLE_HOME to prevent accidental usage of the the old binaries.

Procedure ...

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

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

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

4.10 Installing the SAP Backup Library or the Legato Storage Manager This is an optional post-upgrade step [Page 32].

If you want to extend the backup functionality to include, for example, incremental backup, you must use one of the following backup libraries:

• SAP backup library

• Legato Storage Manager

• Backup tool of a third-party vendor that implements the backup interface of the Oracle Recovery Manager

The use of a backup library is optional. You can install a backup library any time after the Oracle upgrade.

For more information on how to install and use the SAP backup library and the Legato Storage Manager, see SAP Note 142635.

When installing third-party backup software, follow the vendor’s instructions.

Page 38: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.11 Checking the Oracle Database Parameters

38 November 2005

4.11 Checking the Oracle Database Parameters Use As part of the post-upgrade steps [Page 32], you check the Oracle database parameters and adjust them if necessary.

Procedure Check the parameter values against the recommendations given in SAP Note 124361, which contains recommendations for the different SAP products.

4.12 Checking the Read Authorization of the <sapsid>adm User Use As part of the post-upgrade steps [Page 32], you check the read authorization of 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

4.13 Changing the Environment for the <sapsid>adm user Use As part of the post-upgrade steps [Page 32], you have to change the environment for the <sapsid>adm user only on the database server.

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

Procedure ...

1. On the database server set the ORACLE_HOME environment variable to point to the location of the Oracle Database 10g software installation, for example:

/oracle/<DBSID>/101_<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 <sapsid>adm user.

4. Check whether R3trans can connect to the database: R3trans –d

Page 39: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.14 Checking SAP Profile Parameters

November 2005 39

4.14 Checking SAP Profile Parameters Use As part of the post-upgrade steps [Page 32], you check the following SAP profile parameters:

• DIR_ORAHOME

• DIR_CLIENT_ORAHOME

• DIR_SERVER_ORAHOME

Procedure ...

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

4.15 Installing the Oracle Instant Client Use As part of the post-upgrade steps [Page 32], you might need to extract the Oracle Instant Client software. This is necessary if the JDBC driver location [Page 39] refers to the Oracle Instant Client directory, rather than the Oracle home directory.

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

4.16 Changing the Location of the JDBC Driver Use As part of the post-upgrade steps [Page 32], you need to change the location of the JDBC driver for Java systems.

If you have installed either a Java standalone system or an ABAP+Java (Add-In) system you have to change the location of the JDBC driver after you have upgraded the database. Otherwise the J2EE Engine cannot start because the location of the JDBC driver still points to the path of the old $ORACLE_HOME.

You change the location of the JDBC driver as follows.

• In files that are located in the database you use the J2EE Engine Config Tool to change JDBC driver location.

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

Prerequisites

Page 40: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.16 Changing the Location of the JDBC Driver

40 November 2005

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

o Java standalone system:

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

o Java Add-In system:

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

2. Open the file with with your text editor and search for the property rdbms.DriverLocation.

3. Replace the old driver location with the new one:

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

4. In the same directory as in the first step, start the J2EE Engine - ConfigTool by double-clicking the configtool.sh file.

5. Change to Configuration Editor mode.

6. Use the Edit mode to replace the driver location in the following property sheets that contain the string rdbms.driverLocation= followed by the driver location:

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

where XXXXXXX is the instance number.

Make sure that you change all occurences. There might be several IDXXXXXX.JavaParameters properties in the property sheet.

o cluster_data/dispatcher/IDXXXX/kernel/propertysheet ConfigurationManager

o cluster_data/server/IDXXXX/kernel/propertysheet ConfigurationManager

where XXXX is the instance number

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

7. Change to the bootstrap.properties file, which is located in the following directory:

• Java standalone system:

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

• Java Add-In system:

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

8. Open the file with your text editor and search for the property rdbms.DriverLocation.

9. Replace the old driver location with the new one:

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

Page 41: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.17 Restarting the SAP System

November 2005 41

If you have more than one J2EE Engine server installed, you must repeat steps 6 to 9 for all servers.

10. Change to the sdmrepository.sdc file, which is located in the following directory:

• Java standalone system:

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

• Java Add-In system:

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

11. Search for the following text:

<Param type="String" hide="false" name="jarPaths" encrypted="false" displayName="Driver Paths (separated by ;)">

12. Replace the old driver location with the new one, for example one of the following:

/oracle/<DBSID>/101_64/jdbc/lib/classes12.jar

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

13. Change to the rdb.properties file, which is located in the following directory:

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

14. Open the file with your text editor and search for the property rdbms.DriverLocation.

15. Replace the old driver location with the new one:

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

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

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

17. Open the file with your text editor and search for the property RDBMS_DRIVER_LOCATION.

18. Replace the old driver location with the new one:

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

4.17 Restarting the SAP System Use As part of the post-upgrade steps [Page 32] you need to restart the SAP system.

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

Startsap

2. ABAP systems only: check the new Oracle version using SAP transaction ST04.

Page 42: Ora 101 Unix RampUp 103

4 Post-Upgrade Steps

4.18 Starting BR*Tools as the <sapsid>adm user

42 November 2005

4.18 Starting BR*Tools as the <sapsid>adm user Use As part of the post-upgrade steps [Page 32] you need to start BR*Tools as the <sid>adm user with transaction DB13. You only need to perform this step on the database server once and only for SAP systems running kernel version 6.40 or lower.

BR*Tools (release 7.00) are linked against Oracle Database 10g. Therefore, if you want to schedule these tools with transaction DB13 or as the <sid>adm user, you need to perform the additional steps shown below.

Procedure Enter the following commands as the Oracle user ora<dbsid>:

a. cd /oracle/client

b. mkdir 10x_64

c. cd 10x_64

d. ln –s $ORACLE_HOME/lib lib

e. ln –s $ORACLE_HOME/jdbc jdbc

4.19 Configuring the New Features for Oracle Database 10g Release 1 (10.1) Use As part of the post-upgrade steps [Page 32], you need to configure the new Oracle Database 10g Release 1 (10.1) features.

Procedure For more information about new features with Oracle Database 10g Release 1 (10.1) see SAP Note 828268. This note also provides links to other SAP notes that describe how to configure or activate each new feature.