It's easy to migrate applications from Oracle to DB2 V9.7!

Source: Internet
Author: User

This article describes how to migrate an application from an Oracle database to a DB2 V9.7 database. This article mainly provides a simple and powerful practical application tool, migrate applications from Oracle to IBM®DB2®Version 9.7 for Linux®, UNIX®, And Windows®.

You can also use this tool to migrate data from other database management systems to DB2 for Linux, UNIX, and Windows and DB2 for z/OS.®.

Introduction

Starting from DB2 V9.7 for Linux, UNIX, and Windows, you no longer need to use Oracle Applications on DB2 products through Migration Toolkit (MTK. The Data Movement Tool replaces the MTK function and significantly simplifies the workflow.

For all other scenarios, such as transferring data from a database to DB2 for z/OS, this tool is particularly outstanding in high-speed data transfer. We used this tool to transfer 4 TB of data within three days.

GUI provides easy-to-use interfaces for beginners, while advanced users prefer command line APIs.

Preparation

Download

First, download the tool to your target DB2 server. An additional step is required to transfer data to DB2 for z/OS.

Install

Download the IBMDataMovementTool.zip file and decompress it to the IBMDataMovementTool directory on the target DB2 server. To achieve the best data transfer performance, it is strongly recommended to install the server on DB2 ).

Prerequisites

To run Oracle Applications on DB2 for Linux, UNIX, and Windows, install DB2 V9.7 on the target server.

Java must be installed on the target server™Version 1.5 or later. You can run the java-version command to check the current Java version. By default, Java is installed in <install_dir> \ SQLLIB \ java \ jdk (Windows) of DB2 for Linux, UNIX, and Windows) or/opt/ibm/db2/V9.7/java/jdk (Linux.

Find the location of the JDBC driver for the source database and DB2.

Database JDBC driver

 
 
  1. Oracle ojdbc14.jar, xdb. jar, xmlparserv2.jar, or classes12.jar is classes111.jar for Oracle 7 or 8i)
  2. SQL Server sqljdbc. jar
  3. Sybase jconn3.jar
  4. MySQL mysql-connector-java-5.0.8-bin.jar
  5. PostgreSQL postgresql-8.1-405.jdbc3.jar.
  6. Ingres iijdbc. jar
  7. DB2 for Linux, UNIX, and Windows db2jcc. jar, db2jcc_license_cu.jar
  8. DB2 for z db2jcc. jar and db2jcc_license_cisuz.jar
  9. Optional Access_JDBC30.jar for MS Access

Environment Settings

UNIX: log on to the server as the DB2 instance owner.

Windows: Start the DB2 command window.

Switch to the IBMDataMovementTool directory. This tool includes a JAR file and two Driver scripts.

IBMDataMovementTool. cmd-run the Command Script of this tool on Windows.

IBMDataMovementTool. sh-run the Command Script of this tool on UNIX.

IBMDataMovementTool. jar-JAR file of this tool.

Create a DB2 target database

To run this tool, you need to connect to the target database. Therefore, you must first create this database. On DB2 V9.7, we recommend that you use the default Automatic Storage and select a 32 KB page size. When you enable an application on DB2 V9.7, the instance and database must be in compatible mode. We also recommend that you adjust the rounding behavior to match Oracle. By setting the re-verification semantic revalidation semantics to deferred_force, you can deploy objects in no dependent order.

On UNIX systems, $ db2set DB2_COMPATIBILITY_VECTOR = ORA

 
 
  1. $ Db2set DB2_DEFERRED_PREPARE_SEMANTICS = YES
  2. $ Db2stop force
  3. $ Db2start
  4. $ Db2 "create db testdb automatic storage yes on/db2data1,
  5. /Db2data2,/db2data3 dbpath on/db2system PAGESIZE 32 K"
  6. $ Db2 update db cfg for testdb using auto_reval deferred_enforce
  7. $ Db2 update db cfg for testdb using decflt_rounding round_half_up
  8. On Windows, C: \> db2set DB2_COMPATIBILITY_VECTOR = ORA
  9. C: \> db2set DB2_DEFERRED_PREPARE_SEMANTICS = YES
  10. C: \> db2stop force
  11. C: \> db2start
  12. C: \> db2 "create db testdb automatic storage yes on C:, D: dbpath on e: PAGESIZE 32 K"
  13. C: \> db2 update db cfg for testdb using auto_reval deferred_enforce
  14. C: \> db2 update db cfg for testdb using decflt_rounding round_half_up

Extract objects and Data

Before running this tool, prepare the following information for the source database and DB2 Server:

IP address or host name of the source database and DB2 Server

Port number to be connected

Required database name, SID, subsystem name, etc.

User ID with DBA privilege on the source database

Password of this user

Location of the source database and DB2 JDBC driver

Information about the storage space or volume/mount point

Run IBMDataMovementTool. cmd on Windows or./IBMDataMovementTool. sh on UNIX. If the server displays images, this tool starts a GUI. Otherwise, it switches to interactive command line mode.

On Windows:

 
 
  1. IBMDataMovementTool.cmd 

On UNIX:

 
 
  1. ./IBMDataMovementTool.sh  

A gui window is displayed. Some messages should also appear in the shell window. Before you start using the GUI, check the messages to confirm that there are no errors.

If DB2_COMPATIBILITY_VECTOR is not set, this tool reports a warning. Follow these steps to set the compatibility vector ).

 
 
  1. [2009-05-15 12.48.59.218] INPUT Directory = .  
  2. [2009-05-15 12.48.59.218] Configuration file loaded: 'jdbcdriver.properties'  
  3. [2009-05-15 12.48.59.218] Configuration file loaded: 'IBMExtract.properties'  
  4. [2009-05-15 12.48.59.218] appJar : 'C:\Vikram\Prospects\DB2Cobra\IBMDataMovementTool.jar'  
  5. [2009-05-15 12.49.01.000] * WARNING *. I did not detect DB2_COMPATIBILITY_VECTOR set for   
  6. compatibility mode.  
  7. [2009-05-15 12.49.01.000] To set compatibility mode, discontinue this program and   
  8. run the following commands  
  9. [2009-05-15 12.49.01.000] db2set DB2_COMPATIBILITY_VECTOR=ORA 
  10. [2009-05-15 12.49.01.000] db2stop force 

The above content is an introduction to migrating applications from Oracle to DB2 V9.7 easily.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.