Sie sind auf Seite 1von 32

IT-Symposium 2005

Oracle 10g Database


Upgrade and Migration

Page 1
www.decus.de 1
IT-Symposium 2005

Monika Dreher
Product Technology Services
ORACLE Corporation

Agenda

y Upgrade to Oracle 10g


y Migrating to Oracle 10g
– Migration Resources
– Sample Migration Process

Page 2
www.decus.de 2
IT-Symposium 2005

Agenda

0.
Prepare

1.
Install Oracle 10g Software

2. 3. Æ exp/imp
Æ COPY, CTAS
Database Upgrade Assistant (GUI) Command line upgrade

Prepare

0.
Prepare

1.
Install Oracle 10g Software

2. 3. Æ exp/imp
Æ COPY, CTAS
Database Upgrade Assistant (GUI) Command line upgrade

Page 3
www.decus.de 3
IT-Symposium 2005

Prepare

Well prepared
the odds are 90% for
your upgrade to
succeed
xxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
xxxxxx

... and 90% of all aborted upgrades fail


due to inadequate preparation and testing !!!

today

?
31-Jan-2009

?
9.2.0

Error Correction S. Extended Support


8.1.7
Ext. Maintain Supp

t
2009
2000

2001

2002

2003

2004

2005

2006

2007

2008

2010

2011

2012

Page 4
www.decus.de 4
IT-Symposium 2005

Prepare
y Patchlevel of source database is irrelevant for the
upgrade

y Install the latest patchset on the target database

y Check for important single (interim) patches

y Error Correction Support Policy:


Note 209768.1 and Note 187553.1 (ECS, EMS and ES)
Answers all questions about desupports, patches, patchsets, the patch process and special terms

y Don't forget operating system patches !

Prepare

y Oracle certification:

Page 5
www.decus.de 5
IT-Symposium 2005

Prepare

Orace 7.x Oracle 8.0.6 Oracle 8.1.7 Oracle 9.0.1 Oracle 9.2.0

Oracle 8.0.5 Oracle 8.1.6

Oracle 8.0.4 Oracle 8.1.5

Oracle 8.0.3

Prepare

Export/Import
for databases <5 GB

Orace 7.x Oracle 8.0.6 Oracle 8.1.7 Oracle 9.0.1 Oracle 9.2.0

Oracle 8.0.5 Oracle 8.1.6

Oracle 8.0.4 Oracle 8.1.5

Oracle 8.0.3

Page 6
www.decus.de 6
IT-Symposium 2005

Prepare
(+) Pros (-) Cons
Oracle Database ysimple and concise y in case of unexpected errors (for
instance if the listener dies
Upgrade Assistant yautomatic
during upgrade) a complete
(GUI) yresource / space checks restart is necessary
ybackup facility y limited possibility to intervene
yparameter adjustment y no OS change possible
yerror log
yinteractive
Command Line ytotal control y error-prone typing
Upgrade yin case of failure: just restart the y interpreting error messages
failed script y no change of OS possible

Full Export/Import yreorganisation y duration especially for large


databases
yOS change possible
y space requirements
yalso possible for Oracle 5/6
SQL*Plus-COPY, yplatform independent y only structure and data –
CTAS and scripts everything else manually

Install

0.
Prepare

1.
Install Oracle 10g Software

2. 3. Æ exp/imp
Æ COPY, CTAS
Database Upgrade Assistant (GUI) Command line upgrade

Page 7
www.decus.de 7
IT-Symposium 2005

Install
y Space / resource requirements
– Software installation: ≥ 1,1 GB
– Database: ≥ 1 GB
– RAM: ≥ 512 MB (recommended: 1 GB)
– EM Grid Control: ≥ 512 MB (recommended: 1 GB)

Install

y Number of CDs and time frame

60 min
3 CDs

20 min Oracle9i
1 CD
Oracle10g
Number of CDs Installation time

Page 8
www.decus.de 8
IT-Symposium 2005

Install

y Pre-install checks:

y Switch off using


./runInstaller -ignoreSysPrereqs

Installation

y Choose Upgrade during installation:

Page 9
www.decus.de 9
IT-Symposium 2005

Database Upgrade Assistant (GUI)

0.
Prepare

1.
Install Oracle 10g Software

2. 3. Æ exp/imp
Æ COPY, CTAS
Database Upgrade Assistant (GUI) Command line upgrade

Database Upgrade Assistant (GUI)

y Features
– Graphically led upgrade
– Lots of important checks
– Creation of spfile
– RAC aware - inclusion of all nodes
y for RAC (almost) a must !!!
– Restore possible

– Can be run with modified upgrade scripts


– Silent mode
dbua –silent –sid V920 [-backup <location>]

– Take care: ARCHIVING will be disabled (Note:276301.1)

Page 10
www.decus.de 10
IT-Symposium 2005

Database Upgrade Assistant (GUI)

Database Upgrade Assistant (GUI)

If "YES" has been chosen then DBUA changes the National Characterset to AL16UTF16

Page 11
www.decus.de 11
IT-Symposium 2005

Database Upgrade Assistant (GUI)

Database Upgrade Assistant (GUI)

Page 12
www.decus.de 12
IT-Symposium 2005

Database Upgrade Assistant (GUI)

Database Upgrade Assistant (GUI)

Page 13
www.decus.de 13
IT-Symposium 2005

Database Upgrade Assistant (GUI)

Database Upgrade Assistant (GUI)

Page 14
www.decus.de 14
IT-Symposium 2005

Database Upgrade Assistant (GUI)

Command Line Upgrade

0.
Prepare

1.
Install Oracle 10g Software

2. 3. Æ exp/imp
Æ COPY, CTAS
Database Upgrade Assistant (GUI) Command line upgrade

Page 15
www.decus.de 15
IT-Symposium 2005

Command Line Upgrade


y E.g. changing to a new server

Server(OLD)
Server(NEW)

1) Install Oracle10g software


2) Copy utlu101i.sql
3) Execute utlu101i.sql
4) Shut down database
5) Copy all relevant files
6) Apply suggested changes
7) Start the upgrade process

Command Line Upgrade


y Command line upgrade:
1. Backup the database
2. Install Oracle 10g software
3. Analyze / modify the database using
utlu101i.sql
4. Switch to new $OH, set required init parameters
and create SYSAUX tablespace
5. Run upgrade script (e.g. u0902000.sql) and
recompile (utlrp.sql)
6. Run post upgrade status tool script:
utlu101s.sql

Page 16
www.decus.de 16
IT-Symposium 2005

Command Line Upgrade


y Pre-upgrade tool utlu101i.sql
– Works in the context of the old database (just run it once !!)
– Checks all init parameters and displays warnings for obsolete
and deprecated parameters
– Checks
y Installed options
y Components
y Tablespace SYSAUX
y Characterset
– Cluster check
– Run it from SQL*Plus
– Keep in mind: run this script only if the old Oracle installation is still there -
otherwise you'll get lots of ORA-600 [17069]

Command Line Upgrade


y Windows only
– Delete the old service:
> oradim -DELETE -SID V817
– Create a new service:
> oradim -NEW
-SID V10G
-SYSPWD password
-STARTMODE m
-PFILE file

Attention: oradim doesn't write a logfile (yet?)

Page 17
www.decus.de 17
IT-Symposium 2005

Command Line Upgrade


y Important init parameter values
y COMPATIBLE ≥ 9.2.0
y SHARED_POOL_SIZE ≥ 96MB (32bit) or ≥ 148MB (64bit)
otherwise: ORA-4031
y PGA_AGGREGATE_TARGET ≥ 25MB
y JAVA_POOL_SIZE ≥ 50MB
y LARGE_POOL_SIZE ≥ 8MB

y Switch to new $ORACLE_HOME

Command Line Upgrade

y Post-upgrade tool utlu101s.sql


– Run against new database in the context of 10g
– Checks the outcome of the upgrade with view
DBA_REGISTRY
– Displays hints in case of failed component upgrades
– Shows scipt names to restart if errors occurred

Page 18
www.decus.de 18
IT-Symposium 2005

Command Line Upgrade


y Post-upgrade tool utlu101s.sql

DBUA - Upgrade Step-by-Step


y Check your currently installed options
– select comp_name, status from dba_registry;
y Recomplie your invalid SYS and SYSTEM objects
using ultrp.sql
– SQL> SELECT UNIQUE object_name,
object_type, owner FROM dba_objects WHERE
status='INVALID';
y Install 10g Database Software
– Please do not upgrade yet!
y Install latest Patch
y Start DBUA and follow the instructions on the screens
y Check your Upgrade
– utlu101s.sql (<ORACLE_HOME>\RDBMS\ADMIN)
y Test your application

Page 19
www.decus.de 19
IT-Symposium 2005

Migrating to Oracle - Agenda

y Migration Strategy
y Migration Details
– Migration Resources
– Sample Migration Process

Migration Strategy

P
r
o
d
Tune u
Inform Assess Train Migrate
& c
Review
t
i
o
n

Page 20
www.decus.de 20
IT-Symposium 2005

Inform Inform

y Oracle Technology Network (OTN)


– The technical source
y Web Casts
– Sales, Marketing and Technical

Assess Assess

y Review current solution


y Define target solution
y Define migration path
y Oracle Consulting Migration Scoping Study
– Analysis of more complex solutions

Page 21
www.decus.de 21
IT-Symposium 2005

Train Train

y Oracle University Classes


– Standard classes
– Partner trainings
y Web based training
– Online classes
– Web casts

Tune
&
Migrate Review

Migrate & Tuning/Review


y Migration Workbench
y Oracle Consulting Services
y Do it yourself

Page 22
www.decus.de 22
IT-Symposium 2005

Migrating to Oracle - Agenda

y Migration Strategy
y Migration Details
– Migration Resources
– Sample Migration Process

Typical Database Migration Projects

y Easy
– 15 to 40 person days
y Medium Complexity
– 40 to 180 person days
y Complex
– 180 - 700 person days
y Very Complex
– > 700 person days

y Most migrations from SQL Server take from 60 –


170 person days

Page 23
www.decus.de 23
IT-Symposium 2005

Migrating to Oracle - Agenda

y Migration Strategy
y Migration Details
– Migration Resources
– Sample Migration Process

Oracle Migration Tools & Resources – cont.

y Automated Estimating Web Site:


– http://imigrate.oracle.com/iMigrate/
y Migration Discussion Forum on OTN:
– http://www.oracle.com/forums/forum.jsp?forum=1
y Oracle Support - MetaLink:
– http://www.oracle.com/support/metalink/index.html

Page 24
www.decus.de 24
IT-Symposium 2005

Migrating to Oracle - Agenda

y Migration Strategy
y Migration Details
– Migration Resources
– Sample Migration Process

Migration - SQL Server to Oracle10g

y Migration Process
y Oracle Migration Workbench
y Database Migration Verifier

Page 25
www.decus.de 25
IT-Symposium 2005

Process

1. Migrating Schema and objects


2. Migrating Business Logic
3. Migrating the Clients applications

Migrating Schema and Objects

Migratable Objects in the database


y Tables and Data • Databases
y Primary Keys • Stored Procedures
y Check Constraints • Triggers
y Foreign Keys • Grants
y Indexes • Rules
y Views
• Defaults
y Groups / Users
• User Defined Types

Page 26
www.decus.de 26
IT-Symposium 2005

Migrating the Business Logic

Business Logic in the database in SQL Server

y Primarily in Transact-SQL (T/SQL)


– Triggers, Stored Procedures
– Conversion to PL/SQL handled by Migration
Workbench
y Extended Stored Procedures
– Callouts from the database packaged as DLL’s and
written in C,C++
– Manual conversion process
y .NET CLR Stored Procedures
– Stored procedures written in a .NET language
– 10gR2 supports these

Migrating the Clients applications

y No big issue if you don’t have any


business logic on the client
y Adapt the way how to call the business
logic
y Managing Resultsets
y Adapt the way how to access the
database
y Error Handling
y In some cases need some rewriting

Page 27
www.decus.de 27
IT-Symposium 2005

Migration - SQL Server to Oracle10g

y Migration Process
y Oracle Migration Workbench
y Database Migration Verifier

What is Oracle Migration


Workbench?

y Oracle Migration Workbench:


– Is a wizard-driven Java tool
– Simplifies the process of migrating third-party
databases to the Oracle platform
– Migrates the entire database
schema, including triggers
and stored procedures

Page 28
www.decus.de 28
IT-Symposium 2005

Oracle Migration Workbench

y Intuitive user interface, supported by migration


wizards
y Supports complete database migration
– Schema & Data
– Triggers & Stored Procedures, Views
y Embedded SQL
– Informix ESQL/C -> Oracle Pro*C
y Ability to customize data types
y Customization supported prior to generation
y Capture / Create / Migrate

Oracle Migration Workbench


Using Workbench Within Migrations

1. Capture the source database structure into


Source Model (online/offline)
2. Map to Oracle Model
• Create a representation of the structure of the
destination database
3. Migrate the source database
• Create the schema online or offline
• Transfer the data online or offline

Page 29
www.decus.de 29
IT-Symposium 2005

Migration - SQL Server to Oracle10g

y Migration Process
y Oracle Migration Workbench
y Database Migration Verifier

Database Migration Verifier

y Compares schema and data between source and


migrated Oracle database

y Supports verification of tables, indexes, function, stored


procedures, and triggers, and view objects

y Validates data in migrated Oracle database against


source database

y Generates a Verification Report of schema and data


verification failures summarized by object name and
type

Page 30
www.decus.de 30
IT-Symposium 2005

Database Migration Verifier

y Provides command line tool interface, allowing tool to


be seamlessly integrated into existing testing
processes

y Provides portable Java application implementation


allowing tool to be easily moved between Windows and
UNIX environments

y Provides support for Microsoft SQL Server 2000 and


Sybase Adaptive Server 12 source databases

Summary

y The migration process is usually painless


and can be accomplished in a short amount
of time
y Oracle supports your migration by means of
– Migration Kits & Resources
– Migration Tools
y Free downloadable tools to assist you in
migrating the database to Oracle
– E.g. SQL Server,IBM DB2,Informix Æ Oracle
10g DB

Page 31
www.decus.de 31
IT-Symposium 2005

QUESTIONS
ANSWERS

Page 32
www.decus.de 32