doc-exports/docs/dws/tool/dws_07_0676.html
Lu, Huayi 346ac31da9 DWS TG 8.1.3.200 VERSION
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-08-28 09:20:17 +00:00

74 lines
6.7 KiB
HTML

<a name="EN-US_TOPIC_0000001234042109"></a><a name="EN-US_TOPIC_0000001234042109"></a>
<h1 class="topictitle1">MySQL SQL Migration</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p8060118">DSC supports the migration from MySQL to <span id="EN-US_TOPIC_0000001234042109__text1958020141713">GaussDB(DWS)</span>, including the migration of schemas, DML, queries, system functions, and PL/SQL.</p>
<div class="section" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_section158342208320"><h4 class="sectiontitle">Performing MySQL Migration on Linux</h4><p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p67111324154310">Run the following command on Linux to start the migration. You need to specify the source database, input and output folder paths, and log paths. The application language can be SQL or Perl. The default language is SQL. The migration type can be <strong id="EN-US_TOPIC_0000001234042109__b18749120182711">Bulk</strong> or <strong id="EN-US_TOPIC_0000001234042109__b02515234274">BLogic</strong>.</p>
<pre class="screen" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_screen18944141010262">./runDSC.sh
--source-db MySQL
[--input-folder &lt;input-script-path&gt;]
[--output-folder &lt;output-script-path&gt;]
[--application-lang SQL]
[--conversion-type &lt;conversion-type&gt;]
[--log-folder &lt;log-path&gt;]</pre>
<p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p1967154715">During the execution of DSC, the migration summary, including the progress and completion status, is displayed on the console.</p>
<pre class="screen" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_screen109612151476">********************** 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
Total number of valid files in input folder : 1
**************************************************************************
Log file path :....../DSC/DSC/log/dsc.log
Error Log file :
DSC process end time : Mon Jan 20 17:24:49 IST 2020
DSC total process time : 0 seconds
********************* Schema Conversion Completed ************************</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_section18781165519813"><h4 class="sectiontitle">Performing MySQL Migration on Windows</h4><p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p14835912293">Run the following command on Windows to start the migration. You need to specify the source database, input and output folder paths, and log paths. The application language can be SQL or Perl. The default language is SQL. The migration type can be <strong id="EN-US_TOPIC_0000001234042109__b918115372715">Bulk</strong> or <strong id="EN-US_TOPIC_0000001234042109__b14191053132719">BLogic</strong>.</p>
<pre class="screen" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_screen2210401466">runDSC.bat
--source-db MySQL
[--input-folder &lt;input-script-path&gt;]
[--output-folder &lt;output-script-path&gt;]
[--application-lang SQL]
[--conversion-type &lt;conversion-type&gt;]
[--log-folder &lt;log-path&gt;]</pre>
<p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p16933172917575">During the execution of DSC, the migration summary, including the progress and completion status, is displayed on the console.</p>
<pre class="screen" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_screen35931333135710">********************** 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 ************************</pre>
<ul id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_ul42814973"><li id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_li57660517">Run the following commands to migrate objects, such as functions, store procedures, and packages that contain PL/SQL statements:<p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p14888715419"><a name="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_li57660517"></a><a name="en-us_topic_0218440533_li57660517"></a><strong id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_b1349819221540">Linux</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_screen47562386">./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/</pre>
<p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p78261431542"><strong id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_b229720256412">Windows</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_screen1593715322417">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</pre>
<p id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_p82261937141616">During the execution of DSC, the migration summary, including the progress and completion status, is displayed on the console. Execution information and errors are written into <a href="dws_mt_0189.html">log files</a>.</p>
<pre class="screen" id="EN-US_TOPIC_0000001234042109__en-us_topic_0218440533_screen33743900">********************** 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 ************************</pre>
</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_mt_0031.html">Using DSC</a></div>
</div>
</div>