DB2 data migration tool

Source: Internet
Author: User
Tags sybase



On any workstation platform that supports DB2 UDB, MTK supports database conversion from Sybase 11.9.2 and Microsoft SQL Server 6.5 and 7.0 to DB2 UDB version 7.2 and higher. For versions earlier than Sybase V11.x and earlier than ms SQL Server V7.0, MTK can also be used to convert scripts imported from these databases. MTK does not support sending data to DB2 UDB for OS/390®And DB2 UDB for z/OS™DB2 UDB for iSeries™. However, you can use the MTK transformation and refinement steps to create DB2 scripts. You can manually modify these scripts for deployment on these platforms. MTK is currently available in Windows NT®And Windows 2000®But only English version is available.

Use the free IBM®DB2®Universal Database™UDB) Migration ToolkitMTK) Simplifies and improves the Migration to DB2 UDB. This new migration utility provides a wizard and easy-to-use five-step interface that helps you quickly change existing Sybase and Microsoft®Converts an SQL Server database object to a DB2 Universal Database.

Using MTK, You can automatically convert data types, tables, columns, views, indexes, stored procedures, and triggers into equivalent DB2 database objects. MTK provides database administrator DBAs and application programmers with tools required to automate migration tasks. Previously, these tasks were not only inefficient but costly. By using the following features in MTK, you can reduce downtime, eliminate human errors, and reduce other resource consumption associated with manual and traditional database migration:

  • Access JDBC through direct source database™/ODBC) or an imported SQL script that extracts database metadata from the source DDL statement.
  • Automate the transformation of database object definitions, including stored procedures, triggers, packages, tables, views, indexes, and sequences.
  • Use useful SQL and Java™Compatible functions, which make the Conversion Function accurate and consistent.
  • Use the SQL converter tool to perform query conversions in real time, or use it as a DB2 SQL learning aid for T-SQL and developers
  • Viewing and refining conversion errors
  • Use deployment options to effectively implement converted objects
  • Generate and run the data movement script
  • Tracking object conversion and data movement statuses with detailed migration log files and reports including error messages, error locations, and DDL change reports)

Use MTK in database solution Decision-Making
The decision to migrate to a new database requires careful consideration of many factors that will affect the business. One of the factors is the resource allocation required to migrate database objects, stored procedures, and physical data from the original database to DB2. Manual, downtime, and possible human errors related to database migration will greatly affect the ROI of your overall data management upgrade ). Get a fully functional migration tool to help you customize objects according to business migration specifications, significantly reducing the costs related to database conversion. Although there are several simple tools that provide resources for database migration, there is almost no simple tool that allows you to customize DDL objects within the tool interface while supporting process languages such as T-SQL ). They also do not support refinement and conversion of complex objects such as triggers and stored procedures. MTK is superior to other migration products in that it helps you view and customize database objects before you deploy database objects to the target database.

MTK supports conversion of most features in most relational database management systems (RDBMS. However, for some migrations, complex RDBMS features such as scalable objects and collections may not be processed by the Migration utility, but must be manually modified.


As the complexity of converted RDBMS features increases, the automation level is reduced and additional manual intervention is required. The value of MTK is embodied in such a complex migration environment. In this case, the tool can be used as a centralized interface for manual metadata operations. In addition, MTK can automate the conversion of other database objects and allow you to focus valuable resources on the most complex RDBMS features.

MTK and overall migration policy
Database migration is a multi-stage process that requires a lot of planning and project management work. It is important to understand the general migration process to understand how and where MTK fits your policy. Generally, the migration process consists of the following phases:

  1. Pre-migration planning and evaluation:In this phase, you define the scope of migration and evaluate the resource planning and scheduling task schedules, including risk assessment, concept verification, data backup, segmentation, time period planning, and migration skill training.
  2. Migration:In this phase, conversion experts or DBAs convert data to DB2 and directly deploy scripts and data to the target DB2 database.
  3. Post-migration testing and verification:This final migration stage is responsible for tuning the target database, migrating applications, setting the production environment, executing tests, and training DB2 users.

MTK is designed for the second stage of migration. This stage includes the actual conversion of database objects and the deployment of those objects and data to the target DB2 database. Although MTK will assist you in the most critical phase of migration, correct implementation of other stages is still indispensable to ensure successful and cost-effective migration. IBM provides a lot of migration experience to help you summarize and implement all stages of the migration policy.

How does MTK work?
The MTK interface provides five iteration steps). Each page in the MTK interface represents a step in the conversion process.


The five-step migration starts with the "Specify Source)" step, which identifies the Source of the object to be converted. During the entire migration processConvert)Step: Convert the object input from the source to the DB2 object, and thenRefined Refine)To view and customize the conversion results. You already haveConversionAndDetailsStepRefineThe conversion result displayed on the tab is accurate and complete. In the last two migration stepsGenerate the Data Transfer Script Generate Data Transfer Scripts)And the database objects and DataDeploy)To the target DB2 database.

Migration Environment
When you configure an environment in which you want to migrate data, you must specify the operating platform for running the database server. The source database manager exists on a special platform, while the DB2 Universal Database can exist on another platform.®Windows NT or Windows 2000.

If your target DB2 database manager runs on Windows NT or Windows2000, you can install the DB2 Migration Toolkit and DB2 on the same system. ODBC or JDBC™The local drive accesses the source database. If the file contains SQL exported using the standard SQL-non-dedicated format) in the correct format, the toolbox can also be imported from the file.

Deploying a database to a system platform that is not explicitly supported by MTK is possible. During deployment, MTK executes a group of batch files, including the necessary commands for deployment. If you know the shell command syntax of the target system, you can copy the files to the system, make necessary modifications to them, and execute them. For example, you can manually modify and run the UNIX®*. Sh) script, so that deployment and data migration can be performed on the target UNIX machine, rather than the intermediate Windows machine with MTK installed.

The following describes the five iteration steps on the MTK interface:

Step 1: Specify the source
After creating or opening a migration project, you can start the migration process. Your first step is to obtain the DDL source file to be converted to DB2. This step is completed on the Specify Source Page.

Use ODBC or Java™Connection, you can directly extract the source from the source database, or import scripts. For example, when importing a script, you can import the source script from the previous extraction or source database. You can also specify and convert multiple source files.

Step 2: Convert
In the conversion step, you can select from a column of formatting options that affect the conversion output. The conversion procedure can also be used to change the default ing between the source data type and the target DB2 data type.

After selecting from the conversion options, the source DDL statement is converted to DB2 DDL. Each conversion result is a DB2 file. db2) and a report file. rpt). Each file containsPrefix for generated filesThe prefix specified by the domain. The DB2 file contains the DB2 DDL statements created during the conversion. The source DDL statements are usually added as comments before these statements. The report file contains a column of errors identified during conversion. You canRefineView and edit these files on the page, which is automatically opened after the object is converted.

Step 3: refine

The detailed steps are used to view the conversion result, locate the error message, and change the converted DDL.

After refining the converted data, you must return to the conversion step to apply the change. When you execute the conversion step again, the converter merges the refined changes with the source DDL statements that were originally extracted to generate the updated target DB2 and XML Metadata, which are represented by the source object specified by the DDL ). The initial DDL statement is not changed. RepeatedConversion-refinementSteps until you are satisfied with the results.

You can use other tools such as SQL Translator, Log, and Reports to help you refine the conversion. After refining the DB2 DDL statements to a satisfactory level, you can continue to generate a data conversion script to prepare a data conversion script, or go to the DB2 deployment step to execute the DB2 DDL statement.

Step 4: generate a data conversion script
In this step, the data conversion scripts Windows NT *. bat) and UNIX *. sh are generated, which can be used to create data files in DB2 format. There are several options that allow you to specify the mount and import, file format, file type modifier, parameters, and create index options to meet your specific migration needs.

Step 5: deploy to DB2

The deployment procedure is used to deploy data to the target DB2 database. In this step, you can execute DDL to create a metadata object, extract data from the source database, load the data into the target DB2 table, or select any combination of the three options.

MTK provides these different options to adapt to a wide range of possible system environments. A common method for these features is to use the Deploy option so that you can execute DDL statements during the day and Deploy the actual data on a night when the network usage is low.

If you need to convert and refine the data on a different system than the system where DB2 resides, you can copy the MTK and its project directory to the DB2 system and deploy it locally. If you are familiar with DB2 on a non-Windows 2000 operating system, it is possible to modify the batch files on those systems to adapt to the deployment of DB2 on those systems. MTK generates scripts for UNIX and Windows platforms. Although this situation is not fully tested and supported, you can copy the mtk. jar file and the batch files used during deployment. Because the. jar file is used, Java 1.3.0 is still a prerequisite for starting the system.






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.