MySQL SQL Migration

DSC supports the migration from MySQL to GaussDB A and GaussDB(DWS), including the migration of schemas, DML, queries, system functions, and PL/SQL statements.

MySQL Migration in Linux

Run the following commands to set the source database, input and output folder paths, log path, application language (SQL/Perl), and migration type (Bulk/Blogic):

./runDSC.sh
--source-db MySQL 
[--input-folder <input-script-path>] 
[--output-folder <output-script-path>]
[--application-lang SQL] 
[--conversion-type <conversion-type>] 
[--log-folder <log-path>]

During the execution of DSC, the migration summary, including the progress and completion status, is displayed on the console.

********************** Schema Conversion Started *************************
DSC process start time : Mon Jan 20 17:24:49 IST 2020
Statement count progress 100% completed [FILE(1/1)]

Schema Conversion Progress 100% completed
************************************************************************** 
Total number of files in input folder : 1
************************************************************************** 
Log file path :....../DSC/DSC/log/dsc.log
DSC process end time : Mon Jan 20 17:24:49 IST 2020
DSC total process time : 0 seconds
********************* Schema Conversion Completed ************************

MySQL Migration in Windows

Run the following commands to set the source database, input and output folder paths, log path, application language (SQL/Perl), and migration type (Bulk/Blogic).

runDSC.bat
--source-db MySQL 
[--input-folder <input-script-path>] 
[--output-folder <output-script-path>]
[--application-lang SQL] 
[--conversion-type <conversion-type>] 
[--log-folder <log-path>]

During the execution of DSC, the migration summary, including the progress and completion status, is displayed on the console.

********************** Schema Conversion Started *************************
DSC process start time : Mon Jan 20 17:24:49 IST 2020
Statement count progress 100% completed [FILE(1/1)]

Schema Conversion Progress 100% completed
************************************************************************** 
Total number of files in input folder : 1
************************************************************************** 
Log file path :....../DSC/DSC/log/dsc.log
DSC process end time : Mon Jan 20 17:24:49 IST 2020
DSC total process time : 0 seconds
********************* Schema Conversion Completed ************************
  • When migrating objects such as functions, procedures, and packages that contain PL/SQL statements:

    Linux:

    ./runDSC.sh --source-db MySQL --input-folder /opt/DSC/DSC/input/mysql/ --output-folder /opt/DSC/DSC/output/ --application-lang SQL --conversion-type BULK --log-folder /opt/DSC/DSC/log/

    Windows:

    runDSC.bat --source-db MySQL--target-db GaussDBA --input-folder D:\test\conversion\input --output-folder D:\test\conversion\output --log-folder D:\test\conversion\log --application-lang SQL --conversion-type Bulk

    During the execution of DSC, the schema conversion summary, including the progress and completion status, is displayed on the console. Execution information and errors are written into log files.

    ********************** Schema Conversion Started *************************
    DSC process start time : Mon Jan 20 17:24:49 IST 2020
    Statement count progress 100% completed [FILE(1/1)]
    
    Schema Conversion Progress 100% completed
    ************************************************************************** 
    Total number of files in input folder : 1
    ************************************************************************** 
    Log file path :....../DSC/DSC/log/dsc.log
    DSC process end time : Mon Jan 20 17:24:49 IST 2020
    DSC total process time : 0 seconds
    ********************* Schema Conversion Completed ************************