doc-exports/docs/dws/tool/dws_16_0026.html
Lu, Huayi 27019c2991 DWS TOOL 830.201 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:35:25 +00:00

52 lines
8.0 KiB
HTML

<a name="EN-US_TOPIC_0000001772696076"></a><a name="EN-US_TOPIC_0000001772696076"></a>
<h1 class="topictitle1">Teradata SQL Migration</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p2223131814114">DSC supports the migration from Teradata to GaussDB(DWS), including the migration of schemas, DML, queries, system functions, and type conversion.</p>
<div class="section" id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_section15732843173516"><h4 class="sectiontitle">Performing Teradata SQL Migration</h4><p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p92191414529">Run the following commands to set the source database, input and output folder paths, log paths, and application language.</p>
<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p1782719713280"><strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b1482015149285">Linux</strong><strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b346446132311">:</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_screen10985528132313"><strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b8985112872316">./runDSC.sh </strong>
<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b1984013293613">--source-db</strong> Teradata
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b94431321165613">--input-folder</strong> &lt;input-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b547482518567">--output-folder</strong> &lt;output-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b13025283561">--log-folder</strong> &lt;log-path&gt;]
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b212916273113">--application-lang </strong>SQL]</pre>
<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p689242218286"><strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b5324172562810">Windows</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_screen9866171882117"><strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b18931522142816">runDSC.bat </strong>
<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b203201742111112">--source-db</strong> Teradata
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b173201429117">--input-folder</strong> &lt;input-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b53201042161119">--output-folder</strong> &lt;output-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b20320742101116">--log-folder</strong> &lt;log-path&gt;]
[<strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b432064211111">--application-lang </strong>SQL]</pre>
<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p13219171125217">For example:</p>
<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p149251038102816"><strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b144691557152811">Linux</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_screen37868549">./runDSC.sh --source-db Teradata --target-db GaussDBA --input-folder /opt/DSC/DSC/input/teradata/ --output-folder /opt/DSC/DSC/output/ --log-folder /opt/DSC/DSC/log/ --application-lang SQL --conversion-type Bulk</pre>
<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p1036983512282"><strong id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_b13580105913287">Windows</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_screen1780915402814">runDSC.bat --source-db Teradata --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_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p13773535184918">During the execution of DSC, the migration summary, including the progress and completion status, is displayed on the console. Execution information and errors will be recorded in <a href="dws_16_0033.html#EN-US_TOPIC_0000001819416117">SQL Migration Logs</a>.</p>
<pre class="screen" id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_screen15656965">********************** 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>
<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p10203174118210">For details about how to migrate Teradata SQL using DSC, see <a href="dws_16_0020.html#EN-US_TOPIC_0000001819416093">Executing DSC</a>.</p>
<div class="note" id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_note17301658135010"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p12430183816387">During the migration, the metadata of the input script can be called and is stored in the following files:</p>
<ul id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_ul143033853816"><li id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_li1043093813389">Teradata migration<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p19884621184813"><a name="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_li1043093813389"></a><a name="en-us_topic_0000001658024518_en-us_topic_0000001388318736_li1043093813389"></a>1.teradata-set-table.properties</p>
</li></ul>
<p id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_p7295104419425">Clear the preceding files in the following scenarios:</p>
<ul id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_ul8885172194811"><li id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_li20648131418436">Migration of different files</li><li id="EN-US_TOPIC_0000001772696076__en-us_topic_0000001658024518_en-us_topic_0000001388318736_li6697132384311">Migration of the same file with different parameter settings</li></ul>
</div></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0024.html">Database Schema Conversion</a></div>
</div>
</div>