doc-exports/docs/dws/tool/dws_mt_0038.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

54 lines
7.3 KiB
HTML

<a name="EN-US_TOPIC_0000001188202632"></a><a name="EN-US_TOPIC_0000001188202632"></a>
<h1 class="topictitle1">Teradata SQL Migration</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p676383314441">DSC supports the migration from Teradata to <span id="EN-US_TOPIC_0000001188202632__text1958020141713">GaussDB(DWS)</span>, including the migration of schemas, DML, queries, system functions, and type conversion.</p>
<div class="section" id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_section15732843173516"><h4 class="sectiontitle">Performing Teradata SQL Migration</h4><p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p92191414529">Run the following commands to set the source database, input and output folder paths, log path, and application language:</p>
<p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p1782719713280"><strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b1482015149285">Linux</strong><strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b346446132311">:</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_screen10985528132313"><strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b8985112872316">./runDSC.sh </strong>
<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b1984013293613">--source-db</strong> Teradata
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b94431321165613">--input-folder</strong> &lt;input-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b547482518567">--output-folder</strong> &lt;output-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b13025283561">--log-folder</strong> &lt;log-path&gt;]
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b212916273113">--application-lang </strong>SQL]</pre>
<p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p689242218286"><strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b5324172562810">Windows</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_screen9866171882117"><strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b18931522142816">runDSC.bat </strong>
<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b203201742111112">--source-db</strong> Teradata
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b173201429117">--input-folder</strong> &lt;input-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b53201042161119">--output-folder</strong> &lt;output-script-path&gt;]
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b20320742101116">--log-folder</strong> &lt;log-path&gt;]
[<strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b432064211111">--application-lang </strong>SQL]</pre>
<p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p13219171125217">For example:</p>
<p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p149251038102816"><strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b144691557152811">Linux</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_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_0000001188202632__en-us_topic_0218440286_p1036983512282"><strong id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_b13580105913287">Windows</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_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_0000001188202632__en-us_topic_0218440286_p13773535184918">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_0000001188202632__en-us_topic_0218440286_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_0000001188202632__en-us_topic_0218440286_p10203174118210">For details about how to migrate Teradata SQL using DSC, see <a href="dws_mt_0035.html">Migrating Data Using DSC</a>.</p>
<div class="note" id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_note17301658135010"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_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_0000001188202632__en-us_topic_0218440286_ul143033853816"><li id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_li1043093813389">Teradata migration<p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p19884621184813"><a name="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_li1043093813389"></a><a name="en-us_topic_0218440286_li1043093813389"></a>teradata-set-table.properties</p>
</li></ul>
<ul id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_ul3755124374820"><li id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_li5755124374811">Oracle migration<ol id="EN-US_TOPIC_0000001188202632__ol58253418461"><li id="EN-US_TOPIC_0000001188202632__li1182513410467">global-temp-table.properties</li><li id="EN-US_TOPIC_0000001188202632__li155111152154618">global-temp-tables.properties</li><li id="EN-US_TOPIC_0000001188202632__li13537155817460">primary-key-constraints.properties</li><li id="EN-US_TOPIC_0000001188202632__li107721831164715">package-definition.properties</li><li id="EN-US_TOPIC_0000001188202632__li16493104114719">package-names-oracle.properties</li><li id="EN-US_TOPIC_0000001188202632__li106195474711">create-types-UDT.properties</li></ol>
</li></ul>
<p id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_p7295104419425">Clear the preceding files in the following scenarios:</p>
<ul id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_ul8885172194811"><li id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_li20648131418436">Migration of different files</li><li id="EN-US_TOPIC_0000001188202632__en-us_topic_0218440286_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_mt_0031.html">Using DSC</a></div>
</div>
</div>