6.1 Considerations concerning data porting
Data porting describes the steps that are necessary to get data from one
database to another one. In general, you have to unload (also referred to as
dump
or
export
) the data from the source database into one or more files, and
load (also referred to as
import
) the files into the target database.
Database systems provide commands and tools for unloading and loading data.
In MySQL the
mysqldump
tool is for unloading a database. DB2 UDB provides
the
LOAD
and
IMPORT
commands for loading data from files into the database.
You have to be aware of differences in how specific data types are represented
by different database systems. For example, the representation of date and time
values may be different in different databases, and it is often depends on the
local settings of the system.
If the source and the target database use different formats, you need to convert
the data either automatically by tools or manually. Otherwise, the loading tool
cannot understand the data to load due to the wrong format.
The migration of binary data stored in BLOBs should be done manually because
binary data cannot be exported to files in a text format.
Porting the user account management is a very specific step in a migration
project. You need to get the information about users, access rights, and
privileges out of MySQL, convert it to DB2 specific security information, and
create the users in DB2 UDB according to the source data. Migrating encrypted
passwords is impossible in most cases.
6.1.1 Commands and tools supporting data porting
MySQL and DB2 UDB provide tools that support data porting between these two
systems. In MySQL the
mysqldump
utility is used to retrieved data from the
database; the
LOAD
and
IMPORT
commands can be used to get this data into DB2
UDB.
MTK automates the use of the
mysqldump
utility and the DB2
LOAD
command.
The mysqldump tool
When porting application data, this tool can be used for retrieving the data from
MySQL tables. It is shipped with MySQL and is usually located in the
bin
directory of the MySQL installation.
The basic usage of the
mysqldump
tool is as follows:
128
MySQL to DB2 UDB Conversion Guide
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved