0% found this document useful (0 votes)
148 views8 pages

Oracle Upgrade (9.2.0 To 10.2)

The document describes the steps to upgrade an Oracle database from version 9.2.0 to 10.2. It details requirements checking, software installation, database migration, and post-upgrade tasks including updating tools and gathering statistics.

Uploaded by

Sivakumar D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views8 pages

Oracle Upgrade (9.2.0 To 10.2)

The document describes the steps to upgrade an Oracle database from version 9.2.0 to 10.2. It details requirements checking, software installation, database migration, and post-upgrade tasks including updating tools and gathering statistics.

Uploaded by

Sivakumar D
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Oracle Upgrade (9.2.0 to 10.

2)

Planning

Checking the Original Version of Your Database

It should be Oracle 9.2.0.6 or later

Using the Oracle Database Upgrade Assistant (DBUA) tool.

Hardware and Software Requirements

At least 1024 MB of physical RAM

About 500 MB free space in the %TEMP% directory

Between 2 GB and 3.5 GB of disk space for the Oracle software

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

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

Preparation

Make sure that you have installed the latest Microsoft C Runtime dlls of version 71
with R3DLLINS.EXE.

Please refer to Note 684106.Download the latest version of dboraslib.dll for your
release from the

SAP Service Marketplace place. Check the level of your Basis support package

SAP Release (SAP_BASIS) Basis Support Package Level

46B SAPKB46B57

46C SAPKB46C48

46D SAPKB46D38

6.1 SAPKB61041

6.2 SAPKB62044
6.4 SAPKB64009

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

corrections are necessary.

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.

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

Execute the SQL script sapconn_role.sql as follows:

%ORACLE_HOME%\database

copy <ORACLE_DVD>:\NT\<platform>\SAP\sapconn_role.sql

sqlplus /nolog @sapconn_role

Migrating to Automatic Undo Management, by default it will be enabled from oracle


9.2.0

Checking the SYSTEM and SYSAUX Tablespace for Freespace

You need to make sure that the SYSTEM and SYSAUX tablespaces have at least 750
MB freespace.

brspace –f dbshow –c tsinfo –s SYSTEM

Checking for Invalid Database Objects

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

Oracle Database Upgrade

Installing the Oracle Database Software

Installing the Oracle 10g Client Software

Copying and Adapting the SQL*Net Files

After the database software installation, you must copy and modify the old SQL*Net
files, that is, listener.ora,

sqlnet.ora, and tnsnames.ora.

Copy the SQL*Net parameter files from the <old_ORACLE_HOME>\network\admin-


directory to the

<new_ORACLE_HOME>\network\admin-directory.

Edit the listener.ora in the <new_ORACLE_HOME>\network\admin-directory.

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

section SID_LIST) and change the value of the parameter ORACLE_HOME to point to
the new ORACLE_HOME.

Saving Archive Log Files

You need to save the archive log files in the old user environment

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 to avoid client connections:

lsnrctl stop

Changing the Environment for User <dbsid>adm

In the environment of the user <dbsid>adm, delete the following variables:

ORACLE_HOME

TNS_ADMIN (if it exists)

Set the database parameter JOB_QUEUE_PROCESSES = 0 (INIT<DBSID>.ora)

Log off and log on again to activate the changes.

Performing the Database Upgrade

1. Stop the SAP system.

2. Change the registry entry of ORA_<DBSID>_AUTOSTART as follows:

Enter the command:

oradim -edit –sid <dbsid> –startmode manual

3. Start the Oracle Database Upgrade Assistant from the Start menu with:

Start® Programs® Oracle - <NEW_ORACLE_HOME_NAME>® Configuration and


Migration Tools® Database

Upgrade Assistant

The Oracle Database Upgrade Assistant (DUA) opens. A sequence of windows guides
you through the process.

You can navigate between the windows by choosing Next or Back.

Post-Upgrade Steps

Creating the Oracle TNSListener Service

Open a command prompt and enter the following command:

<complete_path_to_new_Oracle_Home>\bin\lsnrctl start
Changing Environment Variables

1. In the user environment and system environment <SAPSID>adm, check the PATH
variable and, if required,

remove all parts referring to the old Oracle version.

2. In the user environment of <SAPSID>adm, set the ORACLE_HOME variable to the


correct value for Oracle

10g, for example to: <DRIVE>:\ORACLE\PRD\102.

3. Copy tnsnames.ora and sqlnet.ora from %ORACLE_HOME%\network\admin to

\\<sapglobalhost>\sapmnt\<SAPSID>\SYS\profile\oracle.

4. Set the user environment variable TNS_ADMIN to point to the directory

\\<sapglobalhost>\sapmnt\<SAPSID>\SYS\profile\oracle.

5. Set TNS_ADMIN on all ABAP application server.

6. Reboot the computer.

Changing the Registry Value of Oracle Autostart

Change the registry value with the following command: oradim -edit -sid <dbsid> -
startmode manual

Updating BR*Tools

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.

Unpack BR*Tools to the DIR_CT_RUN directory.

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>\database


directory to the new one:
cd <old_ORACLE_HOME>\database

copy init<DBSID>.sap %ORACLE_HOME%\database

Update the SAPDBA role as <dbsid>adm user as follows:

a) Copy sapdba_role.sql from the DIR_CT_RUN directory to the %ORACLE_HOME%\


database directory.

b) Execute the following SQL command(s):

sqlplus /nolog @sapdba_role <SAPSCHEMA_ID> for ABAP

sqlplus /nolog @sapdba_role <SAPSCHEMA_ID>DB for JAVA

Deleting the Old Oracle Software

You use the Oracle Universal Installer to delete the old Oracle software.

1. Stop the database.

2. Stop the service Distributed Transaction Coordinator.

3. Stop the services of the old Oracle Home.

4. Start the Oracle Universal Installer from your Start menu as follows:

If you find the Universal Installer under Start® Programs®


<New_Oracle_Home_Name>® Oracle Installation

Products® Universal Installer, you must start it from this path.

Otherwise, start it from Start® Programs® Oracle Installation Products® Universal


Installer

In the Welcome screen, choose Deinstall Products.

Performing Post-Upgrade Tasks

1. Change database compatibility by executing the following SQL command as the


<dbsid>adm user:

sqlplus /nolog

SQL>connect / as sysdba

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
<dbsid>adm user:

SQL> purge dba_recyclebin;

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

4. Gather Oracle optimizer statistics as follows:

a) Execute the following commands as the <dbsid>adm 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

b) SQL> execute dbms_stats.gather_fixed_objects_stats;

b) Check the log file dbstats.log created at %ORACLE_HOME%\cfgtoollogs for any


errors during the

gathering of statistics.

5. Identify the objects that are invalid after the upgrade as follows:

a) Execute the following commands as the <dbsid>adm user:

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

SQL> spool %ORACLE_HOME%/cfgtoollogs/invalid_post.log

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

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

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

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

SQL> spool off;

6. Restart the database to activate the changes:

a) Log on to the database with SQL*Plus

b) Execute the following commands:

sqlplus / as sysdba
shutdown immediate

startup

7. Gather statistics for SAP schemas:

a) With Oracle Database 10g all tables have statistics, which means that you need to
update some entries in

the DBSTATC table before starting BRCONNECT, as follows:

sqlplus SAP<SAPSCHEMA_ID>/<password>

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

SQL> commit;

b) Update the Oracle database statistics with BRCONNECT as follows:

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

Creating the orapwd File

You create the orapwd file to use for the Oracle Enterprise Manager. This allows you to
connect to the Oracle

database as sysdba without using the operating system users.

This procedure is only required if you upgraded an Oracle 9.2.0.6 database to Oracle
10.2.

You might also like