Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

CUBRID Migration Toolkit Getting Started


3 Getting Started

3.1 Download CMT

Please visit the web site http://www.cubrid.org/?mid=downloads&item=cubrid_migration_toolkit to download the recent version of CMT.

Please make sure the file you downloaded is fit with your OS.

CMT installation File

OS

GUI or Console

CUBRID-Migration-Toolkit-{version}-windows-i386.zip

Windows 32

GUI

CUBRID-Migration-Toolkit-{version}-windows-x64.zip

Windows 64

GUI

CUBRID-Migration-Toolkit-console-{version}-windows.zip

Windows 32/64

Console

CUBRID-Migration-Toolkit-console-{version}-linux.tar.gz

Linux 32/64

Console

CUBRID-Migration-Toolkit-{version}-linux-i386.tar.gz

Linux 32

GUI

CUBRID-Migration-Toolkit-{version}-linux-x86_64.tar.gz

Linux 64

GUI

CUBRID-Migration-Toolkit-{version}-macosx-carbon.tar.gz

Max OS

GUI

 

3.2 Install CMT

CMT is green software, so all the users can do is uncompress the compressed download file to a specified directory.

3.3 Start CMT GUI

Go into the directory where you uncompressed the CMT files and execute the executable file which named “cubridmigration”, the executable file is “cubridmigration.exe” in windows OS.

3.4 Start migration work

3.4.1 Start migration wizard

When CMT GUI is started, click the "New Wizard" on the toolbar or "Migration" >> "New Migration" in the main menu, a dialog will be pop, it is the first step of Migration Wizard.

3.4.2 Migration from an online DB to an online CUBRID DB

Step 1: Check "Online" radio button (by default), select a DB connection in the table list and press "next" button. If The DB connection is not in the table view, press "New" to add the JDBC connection information to table view.

Step 2: Check "Online Migration" radio button, select a CUBRID connection in the table list. If the CUBRID connection is not in the table view, press "New" to add CUBRID JDBC connection information to table view. If target CUBRID DB is running in HA mode, please make sure the "Create PK before migrating data" button is checked. If "Write the records which can’t be insert into target database into SQL files" buttons is checked, the CMT will write the error records into some SQL files which are saved into “errorsqls” directory in the CMT’s root directory. The "commit count" option is how many records will be inserted before transaction is committed.

Step 3: There a two part in this view, the left part is a tree listing all DB objects in the source DB, the right part will display the detail of selected source DB object and related target DB object information. Users can decide which table will be exported from source and import into target DB. And users can change the definitions of target DB objects. Users also can add SQL statements as virtual tables to import into target database.

Step 4: Confirm the settings. If users don’t want to start migration, just want to create a migration script, the button "New script" will create a new script and list it in the script explorer. If users want to save the migration script as an external file, "Export Script" can do this.

After all settings are confirmed, press the "Start" button to start the migration process.

3.4.3 Migration from an online DB to an offline CUBRID DB

Step 1: Check "Online" radio button (by default), select a DB connection in the table list and press "next" button. If The DB connection is not in the table view, press "New" to add the JDBC connection information to table view.

Step 2: Check "Offline Migration" radio button, input the CM server connetion information and press the "Connect" button to connect the CM server. When the CM server is connected, all databases will be listed in the below combo box, select a CUBRID database in the combo box and input database’s user name and password and press "Check User" to get database visting authorization. If database user is checked, press "Next" button to move to next step. And users can press "New database" to create a new CUBRID database at this step.

Step 3: There a two part in this view, the left part is a tree listing all DB objects in the source DB, the right part will display the detail of selected source DB object and related target DB object information. Users can decide which table will be exported from source and import into target DB. And users can change the definitions of target DB objects. Users also can add SQL statements as virtual tables to import into target database.

Step 4: Confirm the settings. If users don’t want to start migration, just want to create a migration script, the button "New script" will create a new script and list it in the script explorer. If users want to save the migration script as an external file, "Export Script" can do this.

After all settings are confirmed, press the "Start" button to start the migration process. 

3.4.4 Migration from an online DB to Files

Step 1: Check "Online" radio button (by default), select a DB connection in the table list and press "next" button. If The DB connection is not in the table view, press "New" to add the JDBC connection information to table view.

Step 2: Check "Database Unload" radio button, input a directory where the files will be saved into. Users can choose the target files format (UnloadDB File/SQL File/CSV File/XLS Files), if "One table one file" button is checked, the CMT will write the differenct table records into different data files.

Step 3: There a two part in this view, the left part is a tree listing all DB objects in the source DB, the right part will display the detail of selected source DB object and related target DB object information. Users can decide which table will be exported from source and import into target DB. And users can change the definitions of target DB objects. Users also can add SQL statements as virtual tables to import into target directory.

Step 4: Confirm the settings. If users don’t want to start migration, just want to create a migration script, the button "New script" will create a new script and list it in the script explorer. If users want to save the migration script as an external file, "Export Script" can do this.

After all settings are confirmed, press the "Start" button to start the migration process.

Note:

If exporting records to XLS files, some column's values which type is BLOB/Binary or too big Varchar/Char may be lost.

If the data source contains BLOB/CLOB values and the target is CUBRID Unload Files, every BLOB/CLOB value will be saved into a file at data directory.

3.4.5 Migration from MySQL XML Dump File

Step 1: Check "MySQL XML dump file" radio button, select a MySQL XML dump file in your computer wand waiting for the CMT checking the validation of selected file. If the file is a valid MySQL XML dump file, press "next" button. If users want re-check the XML file, press "Analyze" button.

Step 2: Select target, it can be an online CUBRID DB, an offline CUBRID DB or files.

Step 3: There a two part in this view, the left part is a tree listing all DB objects in the source DB, the right part will display the detail of selected source DB object and related target DB object information. Users can decide which table will be exported from source and import into target DB. And users can change the definitions of target DB objects. At this step, users can’t input SQLs if source is MySQL XML dump file.

Step 4: Confirm the settings. If users don’t want to start migration, just want to create a migration script, the button "New script" will create a new script and list it in the script explorer. If users want to save the migration script as an external file, "Export Script" can do this.

After all settings are confirmed, press the "Start" button to start the migration process.

 

3.5 Start SQL importing

Start SQL importing wizard

When CMT GUI is started, click the "Import SQL File(s)" on the toolbar or "Migration" >> "Import SQL File(s)" in the main menu, a dialog will be pop, it is the first step of SQL importing Wizard.

Select SQL Files

Add the SQL files into table view and press "Top", "Up", "Down", "Bottom" to change the execution order of the files.

Press "Remove" button to remove the SQL files from table view.

Select target CUBRID DB

Select an online CUBRID DB in the table list or press "New" to create a new CUBRID JDBC connection.

Review configurations

Review all configurations and press "Start" to start importing.

3.6 Start CSV importing

Start CSV importing wizard

When CMT GUI is started, click the "New Migration" on the toolbar and click the menu popped "Import SQL File(s)" on the toolbar or "Migration" >> "Import SQL File(s)" in the main menu, a dialog will be pop, it is the first step of SQL importing Wizard.

Select target CUBRID DB

Select an online CUBRID DB in the table list or press "New" to create a new CUBRID JDBC connection.

Select CSV Files

Add the CSV files into table view and set the column mappings of every CSV file.

Press Remove button to remove the CSV files from table view.

Users can preview the top 10 rows of the selected CSV file by the right part.

Review configurations

Review all configurations and press "Start" to start importing.

3.7 View report

After migration finished, press "View report" button in the migration monitor UI, the migration report will be opened.

The report lists every DB objects’ exporting/importing status.


3-6-1.png

Users can save the tables information into a excel file and the text information (Nonsupport objects and Logs) will be save into a text file.

 

3.8 View migration history

When CMT GUI is started, click the "History" on the toolbar or "Migration" >> "History" in the main menu, a view will be opened, it is the view of migration history management.


3-7-1.png

The migration history manager:


3-7-2.png

Double click the item in the opened view. A migration’s report will be opened:


3-7-3.png

3.9 Database conection management

Users can manage database connections in database explorer or in the migraiont wizard.

New Database Connection

Click the main menu "File" >> "New database connection" or click the pop menu "New database connection" in the database explorer and a new database connection dialog will be opened as below: 

3-8-1_1.png
  

MySQL, Oracle or CUBRID database system are supported. 

And Users can use “JDBC Advanced…” to define the JDBC connection URL.

Delete Database Connection

The “Delete Database Connection” menu in the "File" main menu or the context menu item on host node or database node allows you to delete exist database connection. 

Refresh Database Connection

“Refresh” context menu item database node allows you to refresh exist database connection, to update database objects.

View Database Object

Double click on MySQL/Oracle/CUBRID database node(or table,view, store procedure, function, trigger, serial), or click right mouse key and select “Open” menu item on the context menu; you can view selected database information.


3-8-4.png

 

3.10 Migration Reservation

Select a migration script in the migration script explorer, and click the button "Reservation" on the toolbar or "Migration" >> "Reservation" in the main menu,


3-9-1.png

And a dialog will be popped. Users can set when will start a migration with the selected migration script.


3-9-2.png

There are 3 modes to set the reservation:

One time only: the migration script will run only once at the setting date time.

Repeat Every Day: the migration script will run every day at the setting time.

Advance: CMT support unix cron pattern to launch the migration script.

3.11 Preference

Users can change the data type mapping, some performace parameters, and some data transformation settings in preference dialog.

The prefercen dialog can be opened by clicking the "Preference" on the toolbar or "Migration" >> "Preference" in the main menu.

Genneral

3-10-4.png

 

Show window maximize: If this option is checked, the CMT window will be maximized when it is started.

Always exit without prompt: If this option is checked, there is no confirm dialog popped before CMT window is closed.

Check the new information of CUBID: If this option is checked, a web page below will be opened when CMT is started.

 

3-10-5.png

Migration

3-10-6.png

 

Default Thread Count: It influents the performace of migration, min value is 1 and max value is 50.

Default Page Fetching Count: If source database is a CUBRID database, CMT will fetch the records by page. This option tells CMT how many records should be fetched each time.

Default Commit Count: Tell CMT the max size of records in a transaction.

Temporary File Path: CMT will save all temporary files at the specific path.

 


MySQL to CUBRID data type mapping


3-10-1.png

Oracle to CUBRID data type mapping


3-10-2.png

CUBRID to CUBRID data type mapping


3-10-3.png

 

3.12 Start CMT Console

Run the executable script file which name is “migration.bat” in windows and “migration.sh” in linux.

One parameter is required, and that is the full name of a local migration script.

And there are four optional parameters.

For more information, please run migration.sh/migration.bat without any parameters, some help text will be printed onto the screen to let users know how to use this tool.

And a java environment is required.
comments powered by Disqus
Page info
viewed 373 times
translations en
Author
posted 4 months ago by
kevinlin79
Contributors
updated last month by
View revisions
Share this article