Sie sind auf Seite 1von 5

Oracle database migration from 9i to 10g

Oracle DB migration from 9i to 10g

TECHNOLOGY INFRASTRUCTURE SERVICES

Author Team Date of Creation Wipro email id

Narendra kumar Jonna


PH-Database

14 June 2005 Narendra.jonna@wipro.com

Oracle Database Migration from 9.2.0.5 to Oracle 10.1.0.3

Wipro Technologies TIS

Page 1 of 5

Oracle database migration from 9i to 10g

APPENDIX: 1. Operating system requirements. 2. Install Oracle10g. 3. Preparing the database for migration. 4. Performing the migration. 5. Post migration steps. 6. Starting database with 10g.

Wipro Technologies TIS

Page 2 of 5

Oracle database migration from 9i to 10g

Prerequisites: Should have oracle DBA knowledge in Oracle9i, Oracle10g and basic UNIX skills.

1. Operating System Requirements: OS: RedHat Linux Kernel: .4.21-4.ELsmp on an i686. Oracle versions: oracle9i ( 9.2.0.5) and oracle10g (10.1.0.3) Verify the Os & its version, Check the Database is 32 bit or 64 bit, the requirement for RedHat Lunx is, it can be 32 or 64 bit, Os version should be Red Hat Enterprise Linux ES release 3 (Taroon), Kernel 2.4.21-4.ELsmp on an i686. Perform a complete backup before you start with migration process.

2. Install oracle10g binaries: Log in to the system as Oracle user. Install Oracle10g binaries.

3. Preparing database for migration: login as oracle user and set oracle9i environment variable settings. Connect to oracle9i database as sysdba and run the following script. SQL> connect /as sysdba SQL > spool /tmp/migration_requirement.log SQL> @ /opt/oracle/product/10103/rdbms/admin/utlu101i.sql Go thru the migration_requirement.log file and check the log file for WARNINGS: and set it accordingly as suggested by oracle log file. Adjust the init<SID>.ora file as follows. 1. Make sure the COMPATIBLE initialization parameter is properly set for the new Oracle Database 10g release. 2. SHARED_POOL_SIZE initialization parameter is set to at least 100 MB (for 32bit platforms) or at least 144 MB (for 64-bit platforms). 3. PGA_AGGREGATE_TARGET initialization parameter is set to at least 24 MB. 4. LARGE_POOL_SIZE initialization parameter is set to at least 10 MB. 5. JAVA_POOL_SIZE initialization parameter is set to at least 50 MB. 6. DB_DOMAIN initialization parameter is set properly. 4. Performing the migration: Step 1: Stop the archive process. Shutdown the database you want to upgrade. Turn off the cronjob if it is running. Stop the listener.

Step 2: Create symbolic link of init.ora in new oracle10g home. i.e., $ORACLE_HOME/dbs/

Wipro Technologies TIS

Page 3 of 5

Oracle database migration from 9i to 10g

Remove obsolete initialization parameters and adjust deprecated initialization parameters. Update oratab file with new oracle home. Change oratab to new home. 1. Edit /var/opt/oracle/oratab file and change ORACLE_HOME to 10g. Run <. oraenv > command at your UNIX prompt and pass oracle_sid there. Change Directory to $ORACLE_HOME/rdbms/admin

Step 3: Connect to the database instance as a user with SYSDBA privileges. STARTUP MIGRATE SQL> SPOOL /tmp/upgrade.log Create a SYSAUX tablespace. Sysaux tablespace must be locally managed. Run uold_release.sql, where old_release refers to the release you had installed prior to upgrading. SQL> u0902000.sql (Run this if upgrading from 9.2.0.5 to 10.1.0.3)

The upgrade script creates and alters certain data dictionary tables. It also upgrades or installs the following database components in the new release 10.1 database:Oracle Database Catalog Views

Oracle Database Packages and Types JServer JAVA Virtual Machine Oracle Database Java Packages Oracle XDK Oracle Real Application Clusters Oracle Workspace Manager Oracle interMedia Oracle XML Database OLAP Analytic Workspace Oracle OLAP API OLAP Catalog Oracle Text Spatial Oracle Data Mining Oracle Label Security Messaging Gateway

Run utlu101s.sql, specifying the TEXT option:


SQL> @utlu101s.sql TEXT

5. Post migration steps: Run the following sql to check what needs to be upgraded SELECT comp_name, version, status FROM dba_registry; Turn off the spooling of script results to the log file: SQL> SPOOL OFF
Page 4 of 5

Wipro Technologies TIS

Oracle database migration from 9i to 10g

Check /tmp/upgrade.log file for ORA Errors. SQL> SHUTDOWN IMMEDIATE; SQ: > Startup; Run utlrp.sql to recompile any remaining stored PL/SQL and Java code. SQL> @utlrp.sql Verify that all expected packages and classes are valid: SQL> select count(*) from dba_objects where status=INVALID; SQL> select distinct object_name from dba_objects where status=INVALID;

Run utlrp.sql to recompile any remaining stored PL/SQL and Java code.
SQL> @utlrp.sql

Again verify packages and classes are valid:


SQL> SELECT distinct status='INVALID'; 6. Starting database with 10g.

SQL> SELECT count(*) FROM dba_objects WHERE status='INVALID'; object_name FROM dba_objects WHERE

Start the archive ( if required) Listener startup with new home Change compatibility parameter to 10.1.0.3 Start the cronjob for this database.

---------------xxxxxxxxx--------------Please send your comments on this document to: Narendra.jonna@wipro.com

Wipro Technologies TIS

Page 5 of 5