IB M Migration Toolkit
User's Gui de and Reference
Ve r s i o n 2. 0 .5. 0
Note:
Before using this information and the product it supports, be sure to read the general information under “Notices” on page 513.
First edition (January 2008)
This edition applies to Version 2.0.5.0 and to all subsequent releases and modifications until otherwise indicated in
new editions.
© Copyright International Business Machines Corporation 1999, 2008. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Chapter 1. About this information . . . . . . . . . . . . . . . . .1
The MTK team welcomes your comments . . . . . . . . . . . . . . .1
Supported source and target databases . . . . . . . . . . . . . . . .1
Chapter 2. Overview of the IBM Migration Toolkit . . . . . . . . . . .3
Preparing for successful migration . . . . . . . . . . . . . . . . . .5
Migration environment options . . . . . . . . . . . . . . . . . . . .6
Chapter 3. Getting started with MTK . . . . . . . . . . . . . . . .9
System requirements . . . . . . . . . . . . . . . . . . . . . . .9
Hardware requirements . . . . . . . . . . . . . . . . . . . . .9
Software requirements . . . . . . . . . . . . . . . . . . . . .9
Installing MTK . . . . . . . . . . . . . . . . . . . . . . . . .10
Installing on Windows . . . . . . . . . . . . . . . . . . . . .11
Installing on UNIX and Linux . . . . . . . . . . . . . . . . . . .11
Uninstalling MTK . . . . . . . . . . . . . . . . . . . . . . . .12
Uninstalling on Windows . . . . . . . . . . . . . . . . . . . .12
Uninstalling on UNIX and Linux . . . . . . . . . . . . . . . . . .13
Starting MTK . . . . . . . . . . . . . . . . . . . . . . . . .13
Starting on Windows . . . . . . . . . . . . . . . . . . . . . .13
Starting on UNIX or Linux . . . . . . . . . . . . . . . . . . . .13
Setting application preferences . . . . . . . . . . . . . . . . . . .13
User preference options . . . . . . . . . . . . . . . . . . . .14
Keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . .15
Chapter 4. Types of MTK user interfaces . . . . . . . . . . . . . .17
Chapter 5. Managing migration projects . . . . . . . . . . . . . . .19
Project files . . . . . . . . . . . . . . . . . . . . . . . . . .19
Creating a project . . . . . . . . . . . . . . . . . . . . . . . .20
Opening an existing project . . . . . . . . . . . . . . . . . . . .21
Saving a project . . . . . . . . . . . . . . . . . . . . . . . .21
Closing a project . . . . . . . . . . . . . . . . . . . . . . . .22
Modifying project description . . . . . . . . . . . . . . . . . . . .22
Deleting a project . . . . . . . . . . . . . . . . . . . . . . . .22
Backing up a project . . . . . . . . . . . . . . . . . . . . . . .23
Restoring a project . . . . . . . . . . . . . . . . . . . . . . .23
Modifying user preferences . . . . . . . . . . . . . . . . . . . .24
Chapter 6. The MTK process . . . . . . . . . . . . . . . . . . .25
Connecting to the source database with JDBC or ODBC . . . . . . . . .25
Source database connection and driver information . . . . . . . . . .25
Connecting to Oracle . . . . . . . . . . . . . . . . . . . . .26
Connecting to Informix Dynamic Server . . . . . . . . . . . . . . .27
Connecting to MySQL . . . . . . . . . . . . . . . . . . . . .28
Connecting to Microsoft SQL Server . . . . . . . . . . . . . . . .29
Connecting to Sybase . . . . . . . . . . . . . . . . . . . . .29
Migrate from Oracle to DB2 Version 9.5 for Linux, UNIX, and Windows using
compatibility mode . . . . . . . . . . . . . . . . . . . . . . .30
The GUI process . . . . . . . . . . . . . . . . . . . . . . . .32
Step 1: Specifying the source . . . . . . . . . . . . . . . . . .33
Step 2: Converting source metadata . . . . . . . . . . . . . . . .37
Step 3: Refining the metadata conversion . . . . . . . . . . . . . .48
© Copyright IBM Corp. 1999, 2008 iii
Step 4: Generating scripts . . . . . . . . . . . . . . . . . . . .54
Step 5: Deploy to the target database server . . . . . . . . . . . . .70
The command line process . . . . . . . . . . . . . . . . . . . .86
Configuration file . . . . . . . . . . . . . . . . . . . . . . .86
Running MTK from the command line . . . . . . . . . . . . . . . 111
Command line migration projects . . . . . . . . . . . . . . . . .113
Command line examples . . . . . . . . . . . . . . . . . . . .113
The wizard process . . . . . . . . . . . . . . . . . . . . . . . 121
Step 1: Project Information . . . . . . . . . . . . . . . . . . . 121
Step 2: Source Database . . . . . . . . . . . . . . . . . . . 121
Step 3: Global Type Mapping . . . . . . . . . . . . . . . . . . 122
Step 4: Data Movement . . . . . . . . . . . . . . . . . . . . 122
Step 5: Target Database . . . . . . . . . . . . . . . . . . . . 122
Step 6: Migration Summary . . . . . . . . . . . . . . . . . . . 123
Chapter 7. Reports and logs . . . . . . . . . . . . . . . . . . . 125
Viewing migration reports . . . . . . . . . . . . . . . . . . . . 125
Viewing the application log . . . . . . . . . . . . . . . . . . . . 126
Viewing the changes report . . . . . . . . . . . . . . . . . . . . 126
Chapter 8. Frequently asked questions . . . . . . . . . . . . . . 129
Chapter 9. Introduction to the converter component . . . . . . . . . 141
How the converter works . . . . . . . . . . . . . . . . . . . . . 141
The source script file . . . . . . . . . . . . . . . . . . . . . 141
Script translation . . . . . . . . . . . . . . . . . . . . . . . 142
Restrictions for migrating scripts . . . . . . . . . . . . . . . . . . 143
Object renaming . . . . . . . . . . . . . . . . . . . . . . . . 143
Messages . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Chapter 10. Informix Dynamic Server converter . . . . . . . . . . . 147
Converter behavior and limitations . . . . . . . . . . . . . . . . . 147
System catalogs . . . . . . . . . . . . . . . . . . . . . . . 147
Data types . . . . . . . . . . . . . . . . . . . . . . . . . 147
Operators . . . . . . . . . . . . . . . . . . . . . . . . . 149
Built-in functions . . . . . . . . . . . . . . . . . . . . . . . 151
Expressions . . . . . . . . . . . . . . . . . . . . . . . . 153
Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 153
SQL statements . . . . . . . . . . . . . . . . . . . . . . . 154
SPL statements . . . . . . . . . . . . . . . . . . . . . . . 160
Transaction statements . . . . . . . . . . . . . . . . . . . . 163
Compatibility library (INFX functions) for translations to the DB2 database
product . . . . . . . . . . . . . . . . . . . . . . . . . . 163
DB2 database product supported features . . . . . . . . . . . . . . 164
Chapter 11. MySQL converter . . . . . . . . . . . . . . . . . . 173
Converter behavior and limitations . . . . . . . . . . . . . . . . . 173
Data types . . . . . . . . . . . . . . . . . . . . . . . . . 173
Statements . . . . . . . . . . . . . . . . . . . . . . . . . 175
DB2 Database for Linux, UNIX, and Windows supported features . . . . . . 176
Informix Dynamic Server supported features . . . . . . . . . . . . . 178
Chapter 12. Oracle converter . . . . . . . . . . . . . . . . . . 181
Converter behavior and limitations . . . . . . . . . . . . . . . . . 181
Built-in functions . . . . . . . . . . . . . . . . . . . . . . . 181
Conditions and predicates . . . . . . . . . . . . . . . . . . . 193
iv IBM Migration Toolkit User's Guide and Reference
Cursors . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Data types . . . . . . . . . . . . . . . . . . . . . . . . . 199
Exceptions in PL/SQL . . . . . . . . . . . . . . . . . . . . .211
Expressions . . . . . . . . . . . . . . . . . . . . . . . . 215
Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 224
Naming convention . . . . . . . . . . . . . . . . . . . . . . 224
Operators . . . . . . . . . . . . . . . . . . . . . . . . . 225
Packages . . . . . . . . . . . . . . . . . . . . . . . . . 229
Queries . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Statements . . . . . . . . . . . . . . . . . . . . . . . . . 241
Variable assignment . . . . . . . . . . . . . . . . . . . . . 272
Compatibility library (ORA functions) . . . . . . . . . . . . . . . . 272
National language support . . . . . . . . . . . . . . . . . . . 273
List of functions that simulate Oracle built-in functions . . . . . . . . . 274
The DB2 database product supported features . . . . . . . . . . . . . 279
Informix Dynamic Server supported features . . . . . . . . . . . . . 289
Chapter 13. SQL Server and Sybase converter . . . . . . . . . . . . 301
Converter behavior and limitations . . . . . . . . . . . . . . . . . 301
Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 301
Data types . . . . . . . . . . . . . . . . . . . . . . . . . 302
System procedures . . . . . . . . . . . . . . . . . . . . . . 308
Built-in functions . . . . . . . . . . . . . . . . . . . . . . . 309
Expressions and operators . . . . . . . . . . . . . . . . . . . 317
Queries . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Statements . . . . . . . . . . . . . . . . . . . . . . . . . 322
@@ERROR . . . . . . . . . . . . . . . . . . . . . . . . 335
@@SQLSTATUS . . . . . . . . . . . . . . . . . . . . . . 338
@@ROWCOUNT . . . . . . . . . . . . . . . . . . . . . . 338
Transactions . . . . . . . . . . . . . . . . . . . . . . . . 339
Cursors . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Temporary tables . . . . . . . . . . . . . . . . . . . . . . 342
Table variables . . . . . . . . . . . . . . . . . . . . . . . 343
Stored procedures . . . . . . . . . . . . . . . . . . . . . . 344
Functions . . . . . . . . . . . . . . . . . . . . . . . . . 344
Compatibility library (MSSQL and SYB functions) . . . . . . . . . . . 344
DB2 database product supported features . . . . . . . . . . . . . . 361
Transact SQL function support . . . . . . . . . . . . . . . . . . 368
Chapter 14. Informix Dynamic Server converter messages . . . . . . . 375
MTKI0000 . . . . . . . . . . . . . . . . . . . . . . . . . . 375
MTKI0001 . . . . . . . . . . . . . . . . . . . . . . . . . . 375
MTKI0002 . . . . . . . . . . . . . . . . . . . . . . . . . . 375
MTKI0003 . . . . . . . . . . . . . . . . . . . . . . . . . . 375
MTKI0004 . . . . . . . . . . . . . . . . . . . . . . . . . . 375
MTKI0005 . . . . . . . . . . . . . . . . . . . . . . . . . . 375
MTKI0006 . . . . . . . . . . . . . . . . . . . . . . . . . . 376
MTKI0010 . . . . . . . . . . . . . . . . . . . . . . . . . . 376
MTKI0011 . . . . . . . . . . . . . . . . . . . . . . . . . . 376
MTKI0012 . . . . . . . . . . . . . . . . . . . . . . . . . . 376
MTKI0013 . . . . . . . . . . . . . . . . . . . . . . . . . . 376
MTKI0014 . . . . . . . . . . . . . . . . . . . . . . . . . . 377
MTKI0015 . . . . . . . . . . . . . . . . . . . . . . . . . . 377
MTKI0016 . . . . . . . . . . . . . . . . . . . . . . . . . . 377
MTKI0017 . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Contents v