Tools

Utilizing the CUBRID Migration Tool (CMT)

posted Jul 23, 2020

 

Author: Kiho Eom

 

There are many tips while migrating data using CMT, but among the tips that can be useful in step 4, select a PK before performing data on a table without a PK, or after creating a table, I'll show you some tips to migrate data by adding PK columns!

 

1) How to transfer data after selecting PK column before migration for a table without PK

2) How to avoid rework of PK, as table information without PK is created as it is, and seq column is added to the data before migration to PK for that column.

 

If you perform the data migration work in parallel with the above two, you can make the data migration work easier.

 

Step1:

  • Select source and destination type
  • Click the ‘next’ button

스크린샷, 2020-08-01 01-51-50.png

 

Step 2:

  • Click the edit button to register the "original information" and click the test button to check if it is connected.
  • Connection name: randomly created,
  • host address: IP address,
  • connection port: connection port used,
  • database name: SERVICE_NAME,
  • user name: real user ID,
  • password: real password

- If you cannot connect by clicking the test button, the connection port or database name, user name, and password are incorrect. and if you have access control solution, After connecting the solution, you should check it.

- Click 'Next'

 

스크린샷, 2020-08-01 01-51-58.png

 

 

Step 3:

  • Click the edit button to register the "target information" and click the test button to check if it is connected.
  • Connection name: randomly created,
  • host address: IP address,
  • connection port: connection port used,
  • database name: SERVICE_NAME,
  • user name: real user ID,
  • password: real password

- If you cannot connect by clicking the test button, the connection port or database name, user name, and password are incorrect. and if you have access control solution, After connecting the solution, you should check it.

- Click 'Next'

 

스크린샷, 2020-08-01 01-52-20.png

 

 

 

Step4:

①: Click the table list to view detailed information according to the table.

②: This is a check to transfer data. The part where PK is not checked is that there is no PK in the original table. For this table, I will tell you the PK generation for the "target information" column or PK generation by adding a column.

③: OID: The space where the OID assigned to the deleted data can be reused. Therefore, click this button to reuse the DB space resource.

paint1.png

 

 

①: Check the "PK" check box.

②: Write Pk name in "Target PK Name" Edit (must be based on Name Rule)

③: Click the ">" button to move the column on the left to the right.

paint3.png

 

 

- Select the table of the original DB object on the left, select the "SQL Custom SQL" tab, and add the column to be added with the ALTER command.

paint6.png

 

 

Step5: 

  • Source database information, target database information, tables to be extracted, views to be extracted, foreign keys to be extracted, and serials to be extracted are organized and displayed on the screen for intuitive viewing.

스크린샷, 2020-08-01 01-53-33.png

 

 

Click "Advanced Performance Settings" in step 5 and the screen below will appear:

- It can be performed by designating the number of concurrent tasks, number of threads, and number of commits.

paint4.png

 

End of migration

스크린샷, 2020-08-01 01-53-53.png

 

When all the execution is completed, the saved information can be viewed using the csql command, and the executed information can be viewed even when connected to the CM.

 

Here, the contents are checked by accessing the csql utility command.

1) Execute the csql utility command to check the data migrated table

paint7.png

 

2) Check the table to which the seq column is added

paint8.png