Beruflich Dokumente
Kultur Dokumente
Upgrade to Oracle
Database 10g Release
2 (10.2): UNIX
Target Audience
n Technology Consultants
n System Administrators
Caution
Before you start the implementation, make sure you have the latest version of this document. You
can find 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.11 2/21/2007 Error correction in section Disabling Database User Locking Mechanism For Failed Logins:
command line connect / as sysdba inserted
2.1 8/28/2006 Various changes including new section Disabling Database User Locking Mechanism
for Failed Logins
2.0 8/1/2006 Various changes including new section Installing Oracle Critical Patch Updates
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 New Features . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 SAP Notes for the Upgrade . . . . . . . . . . . . . . . . . . . 6
1.3 More Information on SAP Service Marketplace . . . . . . . . . . . 8
Chapter 2 Planning . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Checking the Original Version of Your Database . . . . . . . . . . . 9
2.2 Checking Hardware and Software Requirements . . . . . . . . . . . 10
2.3 Reviewing the Oracle-Specified Kernel Parameters and Shell Limits . . . . 11
2.4 Checking Additional Requirements for the Upgrade . . . . . . . . . 11
Chapter 3 Preparation . . . . . . . . . . . . . . . . . . . . . . . . 13
3.1 Checking the Correct UNIX Users, Groups, and Authorizations . . . . . 13
3.2 Checking the Directory Structure . . . . . . . . . . . . . . . . 14
3.3 Running the Pre-Upgrade Script . . . . . . . . . . . . . . . . . 15
3.4 Checking the Prerequisites for the Oracle Universal Installer . . . . . . . 16
3.5 Checking the SAP System Prerequisites . . . . . . . . . . . . . . 17
3.6 Migrating to Automatic Undo Management . . . . . . . . . . . . 18
3.7 Stopping Statspack Reports . . . . . . . . . . . . . . . . . . . 18
3.8 Checking the SYSTEM and SYSAUX Tablespace for Freespace . . . . . . 19
3.9 Checking for Invalid Database Objects . . . . . . . . . . . . . . . 20
3.10 Installing the Oracle Instant Client . . . . . . . . . . . . . . . . 20
1 Introduction
This documentation explains how to upgrade the Oracle database for the SAP system on the UNIX
operating system:
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 Oracle Database 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
not recommend 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.7 to 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
system identifier. 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 the upgrade, see Planning [page 9].
n 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:
service.sap.com/notes
n Make sure you are using the Oracle Universal Installer (OUI) shipped with the installation CDs for
Oracle Database 10g Release 2 (10.2).
For the complete list of new features of the Oracle Database 10g Release 2 (10.2), see the New Features
documentation 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 the most important new features in the Oracle documentation since
some new features might affect the operation of your production system.
Make sure that you read the following SAP Notes, which you can find at service.sap.com/notes:
2 Planning
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
Oracle Database 10g Release 2 (10.2) using the Oracle Database Upgrade Assistant (DBUA).
Process
In 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 direct upgrades from Oracle 8.1.7 to Oracle 10.2.0, SAP recommends customers running
Oracle 8.1.7 to first upgrade 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 source database 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) upgrade
documentation 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.
You need to check that you meet the hardware and software requirements for running the new
Oracle release. The complete list of hardware and software requirements for every platform is
included in the Oracle documentation.
Caution
To make sure that the checks complete successfully, you must complete this procedure before
running the Oracle Universal Installer [page 25].
Prerequisites
You can access the complete Oracle documentation referred to below 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
Procedure
1. Note the following general hardware requirements:
n At least 1024 MB of physical RAM
n About 500 MB free space in the /tmp directory
n 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. The complete 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.
This document 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
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 2 (10.2).
Caution
If your database resides on Network Attached Storage (NAS) you need to review and implement
the Oracle NAS guidelines. You need to mount network file systems with specific mount options,
which you can find in the Oracle installation guide.
You need to review the Oracle-recommended kernel parameters and shell limits for your operating
system with 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
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 2 (10.2).
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 6], 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 156548
n 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.
In such 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 Oracle Technology Network at:
www.oracle.com/technology
You need this document to review the hardware and software requirements and to configure the
kernel parameters and shell limits.
Recommendation
If you have access to Oracle Metalink we strongly recommend that you read document 169706.1.
This document 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.
The list of one-off patches is described in SAP Note 871096. You can download the patches from
SAP Service 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
Oracle 10.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
database upgrade from SAP Service Marketplace at:
service.sap.com/swdc
3 Preparation
Note
You have already planned the database upgrade [page 9].
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
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
You need to verify the availability and correctness of the following Oracle directories:
n stage directory
n Oracle inventory directory
n 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
stages from 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 the SAR file containing the database component, which is contained in OR110264.SAR
for 64-bit platforms or 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
RDBMS CDs 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 Disk2 might 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-bit
platforms) 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:
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. The path 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 the inventory 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
automatically creates theoraInst.loc and the inventory directory. You do not need to create
these directories manually.
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>/102_64.
You run the Oracle pre-upgrade information tool. This tool provides information on the existing
pre-upgrade database. 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
Oracle 9i environment.
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/stage/102_64/database/SAP/utlu102i.sql
or:
SQL> @/oracle/stage/102_64/database/Disk1/SAP/utlu102i.sql
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.
Caution
Make the changes listed in the log file, otherwise you might have problems during the upgrade.
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.
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.
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.2 client 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
changes to 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.
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
n If the level of your Basis support package is higher than or equal to that shown above, no
additional corrections are necessary.
n 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.
3. Download the latest version of the Oracle Client software ‒ OCL92064.SAR or 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, 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 on the same host, see SAP Note 964783.
This step is only relevant if your database still uses manual undo management (rollback tablespace
and rollback segments).
If your database still uses 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.
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>
You need to make sure that the SYSTEM and SYSAUX tablespaces have at least 750 MB freespace. This is
necessary due to a bug in the Oracle database that can cause the Oracle Database Upgrade Assistant
(DBUA) to underestimate 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.
Procedure
Check 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:
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 using one 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
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.
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.
You have to extract the Oracle Instant Client software. This is necessary if the JDBC driver location [page
41] refers to 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.
Procedure
Install the Oracle Database 10g Instant Client for UNIX as described in SAP Note 819829.
Prerequisites
You have completed the following:
n Planning [page 9]
n Preparations [page 13]
Process Flow
You install the database software [page 21].
You upgrade the database structure [page 29].
Result
You have completed the upgrade. Now perform the post-upgrade steps [page 21].
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 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 24]. You
need to shut down all Oracle instances on the host before running this script.
Process Flow
3. You perform steps for the AIX operating system [page 24].
End of: AIX
To install the database software [page 21], 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
the Environment for the <sapsid>adm User [page 40].
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>.
Caution
Do not make the changes to the environment permanent as long as the old database is still running.
You make them permanent in the post-upgrade phase. We recommend you to back up the old
environment files 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 Oracle
Universal Installer (OUI) will be displayed.
ORACLE_BASE /oracle
Note
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 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 for the library path:
Operating System Environment Variable Value
AIX LIBPATH $ORACLE_HOME/lib:$LIBPATH
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 path variable 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 or TMPDIR 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
run the UNIX umask command and check that the returned value is 22.
Before you install the database software [page 21] 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
To install the database software [page 21] on the AIX operating system, you need to run the rootpre.sh
script to adapt the AIX kernel and also execute a command as the root user.
Prerequisites
If 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_64/database/Disk1/rootpre using the following
command:
cd /oracle/stage/102_64/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
To install the database software [page 21] 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 see the 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, Accept the OUI proposal and continue by choosing
a dialog box, Specify File Locations Destination..., appears. Next.
This dialog box proposes the inventory location as
/oracle/oraInventory and the installation group
as dba.
Available Product Components Confirm the default selections by choosing Next.
Product-Specific Prerequisite Checks For items that are flagged as warnings or failed,
This phase checks if all necessary requirements for review the cause for the warning or failure on screen
installing and running the database have been met. and fix the problem if possible.
Alternatively you can verify the items manually
and confirm them by clicking the checkbox. You
can find details about each check by clicking on the
relevant item.
Java Development Kit (JDK) HP Tru64: Enter the location of the JDK.
3. At the end of the installation, in case there are any Configuration Assistants that have been started
automatically (for example, Oracle Net) choose Cancel and terminate the Net Config Assistant.
You can ignore messages that some of the config assistants failed to complete successfully.
The Installer finishes, reporting that the Oracle installation was successful. It also informs
you 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.
After the database software installation [page 21] , you need to install the current Oracle Database 10g
Release 2 (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. The
post-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.
After the database software installation [page 21], 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
n Make sure you have already installed the current patch set [page 26].
n Check SAP Note 871096 to find the list of required patches to be installed.
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.
After the database software installation, 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:
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.
You must 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
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.
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 able to 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), you can 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
You need to shut down the SAP system and the Oracle listener running process running in the old
ORACLE_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 the
upgrade. Make sure that you reschedule these processes when the upgrade has finished.
Prerequisites
You have installed the database software [page 21].
Process Flow
Result
Now continue with the Post-Upgrade Steps [page 33].
To upgrade the database structure [page 29] , you need to check the entry for the oratab file.
Prerequisites
You can find the oratab file as follows:
Only valid for: AIX;HP Tru64 UNIX;HP-UX;Linux
n /etc
End of: AIX;HP Tru64 UNIX;HP-UX;Linux
n /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.
To upgrade the database structure [page 29] 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
Caution
Make sure that you start the DBUA in the Oracle 10.2 user environment. To do this, carefully check
the 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 LIBPATH
n Before you start the DBUA make 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:
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 DBUA now analyzes the database to be upgraded, performs pre-upgrade checks, and issues
warnings if necessary. You can ignore warnings about the following:
n Stale optimizer statistics
n Changes to the Oracle CONNECT role
You need to analyze and act on other warnings.
Recommendation
We recommend you to resolve warnings other than those listed above. Otherwise you might
later have problems during the actual upgrade.
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:
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 ‒ 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.
Note
For a complete list of obsolete and deprecated parameters, see the documentation for Oracle
Database 10g Release 2 (10.2).
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 33].
2. You check the upgraded database [page 34].
3. You update BR*Tools [page 35].
4. You back up the database [page 36].
5. You perform post-upgrade tasks [page 36].
6. You install Oracle critical patch updates [page 38].
7. You check the oratab entry [page 39].
8. You start the listener process [page 39].
9. You rename the old $ORACLE_HOME/bin directory [page 40].
10. You check the read authorization of the <sapsid>adm user [page 40].
11. You change the environment for the <sapsid>adm user [page 40].
12. You check the SAP profile parameters [page 41].
13. You change the location of the JDBC driver [page 41].
14. You restart the SAP system [page 44].
15. You disable the database user locking mechanism on failed logins [page 44].
16. You configure the new features for Oracle Database 10g Release 2 (10.2) [page 44].
You need to 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).
Procedure
Check the values for the environment variables as described in Checking and Setting the Environment
Variables [page 22].
Note
Make sure that the environment does not contain any variables that still refer to the old database
release.
Procedure
1. Check that the database is now running with Oracle Database 10g Release 2 (10.2) software in an
Oracle Database 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 database
components:
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
Note
You need to check this document carefully because it contains information on important changes
in the 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 after the upgrade.
You update BR*Tools to the latest release, BR*Tools Release 700, with the latest patch level.
After extracting BR*Tools Release 700 you need to update the SAPDBA role using the script
sapdba_role.sql. This is essential so that the new release of BR*Tools works correctly. The script is
automatically extracted when you extract BR*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
files init<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
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.
Caution
You risk losing data if you do not back up your database.
Procedure
Perform a full database backup.
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);
Note
Call this script for every SAP ABAP schema on the database
Note
For more information on update statistics, see the documentation SAP Database Guide: Oracle on
SAP Service Marketplace at:
http://service.sap.com/dbaora Media Library
The Oracle Critical Patch Updates contain a collection of security-related fixes that are released
once every quarter. Since these patches contain important fixes to significant security problems, we
strongly recommend you 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 26].
n Make sure that you have installed all the required interim patches described in SAP Note 871096.
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.
Prerequisites
You 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
/var/opt/oracle
End of: Solaris
Procedure
1. 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.
Example
The entry for a system with <DBSID> equal to C11 is as follows:
C11:/oracle/C11/102_64:N.
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 28].
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
Once the database is running correctly, you need to rename the bin directory from the old
$ORACLE_HOME to prevent accidental usage of 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
Caution
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.
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
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 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>/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
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
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.
Only valid for: ABAP+Java;Java;Java Add-In
If you have an SAP system with Java components, you may 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:
n In files that are located in the database you use the J2EE Engine Config Tool to change the JDBC
driver location.
n In files that are not located in the database you use Note Pad or another text editor to change
the JDBC driver 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:
Only valid for: Java
n /usr/sap/<SAPSID>/JC<instance_number>/j2ee/configtool
End of: Java
n /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.jar
2. 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 Editor mode.
b) 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:
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.JavaParameters properties in the property sheet.
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:
Only valid for: Java
n /usr/sap/<SAPSID>/JC<instance_number>/j2ee/cluster/bootstrap
End of: Java
n /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
for all servers.
End of: ABAP+Java;Java Add-In
4. Change to the sdmrepository.sdc file, which you can find in the following directory:
Only valid for: Java
n /usr/sap/<SAPSID>/JC<instance_number>/SDM/program/config/
End of: Java
n /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
/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
Procedure
1. If R3trans connects without problems, start the SAP system:
Startsap
2. Check the new Oracle version using SAP transaction ST04.
When upgrading an Oracle database to Oracle version 10g, user locking is automatically activated so
that, if you repeatedly enter invalid login information, the user is locked. By default, ten invalid login
attempts are allowed before 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.
Procedure
To deactivate user locking after invalid logon attempts, enter the following information in sqlplus:
sqlplus /nolog
sql>connect / as sysdba
sql>ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;
sql>exit
You need to configure the new Oracle Database 10g Release 2 (10.2) features.
Procedure
For more information about new features with Oracle Database 10g Release 2 (10.2) see SAP Note
828268. This note provides links to other SAP notes that describe how to configure or activate each
new feature.
Example Description
< > Angle brackets indicate that you replace these words or characters with appropriate
entries to make entries in the system, for example, “Enter your <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 an internet address, for example, http://www.sap.com
/example Quicklinks added to the internet address of a homepage to enable quick access to
specific content on the Web
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, messages
n Source code or syntax quoted directly from a program
n 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,
transaction codes, database table names, and key concepts of a programming language
when they are surrounded by body text, for example, SELECT and INCLUDE
EXAMPLE Keys on the keyboard
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.