CMT is the abbreviation of CUBRID Migration Toolkit.
CMT includes two parts, one is an application with GUI and another is a console tool.
CMT GUI can provide some graphic user interfaces to help users finish their migration work.
CMT Console Tool tool can run in linux and windows with command line.
Because of no GUI, it has better performace then CMT GUI.
It helps users finish migration work in some OS without GUI.
Text files that can be loaded into offline CUBRID database by CUBRID loaddb command.
Migration script is a very important concept in CMT.
Migration scripts are written with XML format. A migration script lets the CMT know how to connect source/target databases and how to transform source DB objects to target DB objects during a migration process.
Migration scripts are created by migration wizard.
Migration script explorer is a view which is on the left part by default when CMT GUI is started.
All migration scripts will be listed in this explorer, users can edit the scripts by this explorer.
All that users can do with scripts are as follows:
Open with wizard: Open a migration wizard, the settings in the wizard is according to the selected migration script.
Rename: Rename the selected migration script.
Delete: Delete selected migration script.
Copy: Make a copy of current selected migration script.
Import: Import an external migration script file to list.
Export: Save selected migration script to an external XML file.
Execution History: If the migration script was set to a migration resveration, users can view this migration script’s starting histories.
Cancel Reservation: Cancel the migration reservation settings of selected migration script.
Migration wizard is a GUI wizard to help users build a migration script step by step.
The first setp is selection migration type and all pages followed will be decided by the selections in the first step.
At the last step of a migration wizard, a migration script will be created or updated and a migration process will start after clicking the Start button.
Users can monitor the migration’s progress when migration is running and view the migration report after migration is finished.
If migration is started, users can monitor the migration progress by migration progress monitor.
Users can read how many records were exported and imported, what error was thrown and how much time was cost from migration progress monitor.
Users can also stop the migration process by clicking Stop button, and when the migration is finished the View Report button will be enabled and users can open the report view by clicking this button.
When migration was finished or interrupted, migration engine will generate a migration report and save it into a local file. Users can review the report by Migration History Manager.
The report includes a lot of information about this migration such as which table was created successfully/failed, how many records were exported and how many records were imported and the error logs during migration process.
Different data source may have different report UI.
Migration report
SQL importing report
CSV importing report
If users want start a migration process at a specific time, not now, migration task reservation can do this.
Users can make the migration process start at a specific time or at a specific time every day or at a specific time with UNIX Cron pattern.
At the last step of migration wizard, when users click the “Start” button, a dialog will be popped:
Users also can choose button “Reservation” to add current migration task to reservation list.
Every migration work generated a migration report and the report was saved at local.
Migration History manager lists the old migration reports and allows users to review the reports.
Users can delete the migration histories.
And users can import an external migration report file into history list and open it.
This is often used for checking a migration report generated by CMT console tool.
Users also can open a migration wizard by a migration history.
Different databases have different data type definitions, so if we want do migration work between different database systems, we should build a data type mapping to let the CMT know how to transform the schemas and data from source database to target database. For example: The string definition is “varhcar2” in Oracle but “varchar” in CUBRID, so we should build a mapping between “varchar2” and “varchar”.
CMT provides a default data type mapping in the preference:
MySQL to CUBRID data type mapping
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Boolean Type
CUBRID does not have a Boolean type. Statements containing Boolean values are transformed by CMT to replace the value with conditional expressions. CMT emulates stored Boolean data by using the CUBRID smallint type.
Character Data Types
CMT converts the basic character types VARCHAR2 and CHAR to CUBRID varchar and char, correspondingly preserving their length. If it is MySQL longtext which has a constant size greater than 1,073,741,823, CMT maps to varchar(1073741823).
If target CUBRID database is specified to access by “UTF-8” charset, varchar or char size would be specified size multi 3. For example, if source MySQL data type is char(255), then the target CUBRID data type is char(765). If target CUBRID database is specified to access by “Unicode” charset or other not “UTF-8” charset, varchar or char size would be specified size multi 2.
Date and Time
CUBRID does not has year data type, so CMT maps year(2|4) to char(4).
Oracle to CUBRID data type mapping
|
Oracle Type Name |
Return value of JDBC |
CUBRID Type |
|
Bfile |
InputSteam |
Blob |
|
Binary_double |
Double |
Double |
|
Binary_float |
Float |
Float |
|
Blob |
Blob |
Blob |
|
Char(n) |
String |
Character(n) |
|
Decimal(p,s) |
BigDecimal |
Numeric(p,s) |
|
Float |
Float |
Float |
|
Interval day to second |
String |
Character varying(255) |
|
Interval year to month |
String |
Character varying(255) |
|
Long |
String |
Clob |
|
Long raw |
Byte[] |
Bit varying(1073741823) Blob |
|
NChar(n) |
String |
Character(n) |
|
Nclob |
Clob |
Character varying(1073741823) |
|
Number(p,s) |
getBigDecimal |
Numeric(p,s) |
|
Number(,0) |
getBigDecimal |
Numeric(38,0) |
|
Number |
getBigDecimal |
Numeric(38,0) |
|
Nvarchar2(n) |
String |
Character varying(n) |
|
Raw(n) |
Byte[] |
Bit Varying(n) |
|
Rowid |
Rowid |
Character varying(64) |
|
Timestamp |
Timestamp |
Timestamp |
|
Timestamp with local time zone |
Timestamp |
Timestamp |
|
Timestamp with time zone |
Timestamp |
Timestamp |
|
Urowid |
Rowid |
Character varying(64) |
|
Varchar2(n) |
String |
Character varying(n) |
Character Data Types
CMT converts the basic character types VARCHAR2 and CHAR to CUBRID varchar and char, correspondingly preserving their length. If it is Oracle Long type which has a constant size greater than 1,073,741,823, CMT maps to varchar(1073741823).
If target CUBRID database is specified to access by “UTF-8” charset, varchar or char size would be specified size multi 3. For example, if source Oracle data type is char(255), then the target CUBRID data type is char(765). If target CUBRID database is specified to access by “Unicode” charset or other not “UTF-8” charset, varchar or char size would be specified size multi 2.
Date and Time
CUBRID doesn’t have "Timestamp with local time zone" and "Timestamp with time zone" types, so time zone information may be lost.
CUBRID doesn’t have "Interval day to second" and "Interval year to month", so map them to "Character varying(255)"
CUBRID to CUBRID data type mapping
|
CUBRID Type Name |
Return value of JDBC |
CUBRID Type |
|
Bigint |
BIGINT |
Bigint |
|
Bit(n) |
BINARY |
Bit(n) |
|
Bit varying(n) |
VARBINARY |
Bit varying(n) |
|
blob |
VARBINARY |
Blob |
|
Character(n) |
CHAR |
Character(n) |
|
Character varying(n) |
VARCHAR |
Character varying(n) |
|
clob |
VARCHAR |
Clob |
|
Date |
DATE |
Date |
|
Datetime |
TIMESTAMP |
Datetime |
|
Double |
DOUBLE |
Double |
|
Float |
REAL |
Float |
|
Glo |
Object |
Glo |
|
Integer |
INTEGER |
Integer |
|
Monetary |
DECIMAL |
Monetary |
|
Set_of(data type) |
ARRAY |
Set_of(data type) |
|
Multiset_of(data type) |
ARRAY |
Multiset_of(data type) |
|
Sequence_of(data type) |
ARRAY |
Sequence_of(data type) |
|
National character(n) |
CHAR |
National character(n) |
|
National character varying(n) |
VARCHAR |
National character varying(n) |
|
Numeric(p,s) |
NUMERIC |
Numeric(p,s) |
|
Smallint |
SMALLINT |
Smallint |
|
Time |
TIME |
Time |
|
Timestamp |
TIMESTAMP |
Timestamp |
Users can report bugs during using CMT if users have connected with internet.
Users can get some news about CUBRID and CUBRID Tools from this view.
![]()