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

276 lines
34 KiB
HTML

<a name="EN-US_TOPIC_0000001188362520"></a><a name="EN-US_TOPIC_0000001188362520"></a>
<h1 class="topictitle1">Database Schema Conversion</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_section779035"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p11837229"><strong id="EN-US_TOPIC_0000001188362520__b9720658113712">runDSC.sh</strong> or <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b11537122961018">runDSC.bat</strong> is used to migrate schemas and queries of Teradata, Oracle, Netezza, MySQL, and DB2 to GaussDB(DWS).</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_section7011317"><h4 class="sectiontitle">Format</h4><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1775411371444"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b17178162316169">Linux</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_screen18626535">./runDSC.sh
--source-db&lt;source-database&gt;
[--input-folder&lt;input-script-path&gt;]
[--output-folder&lt;output-script-path&gt;]
[-application-lang &lt;application-lang&gt;]
[--conversion-type&lt;conversion-type&gt;]
[--log-folder&lt;log-path&gt;]
[--version-number &lt;Gauss Kernel Version&gt;]
[--target-db&lt;target-database&gt;</pre>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p198031645204418"><strong id="EN-US_TOPIC_0000001188362520__b5175175275211">Windows</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_screen147424451078">runDSC.bat
--source-db&lt;source-database&gt;
[--input-folder&lt;input-script-path&gt;]
[--output-folder&lt;output-script-path&gt;]
[-application-lang &lt;application-lang&gt;]
[--conversion-type&lt;conversion-type&gt;]
[--log-folder&lt;log-path&gt;]
[--version-number &lt;Gauss Kernel Version&gt;]
[--target-db&lt;target-database&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_section63101859"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_table50996876" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row33549801"><th align="left" class="cellrowborder" valign="top" width="11%" id="mcps1.3.3.2.2.8.1.1"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p2766357203717"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b2971139178">Long</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.2.2.8.1.2"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p16349549203716"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b10123173181714">Short</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11%" id="mcps1.3.3.2.2.8.1.3"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p40988741203714"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b15124153111720">Data Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.3.2.2.8.1.4"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p33179327"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b15125183161714">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.790000000000001%" id="mcps1.3.3.2.2.8.1.5"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p6659339203721"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b1212793151713">Value Range</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.73%" id="mcps1.3.3.2.2.8.1.6"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p28538697"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b51289317176">Default Value</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.48%" id="mcps1.3.3.2.2.8.1.7"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p27028936"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b11295371716">Example</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row43806994203654"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p21166808203912">--source-db</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p40974388203940">-S</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p31753748203714">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p58705622203654">Source database</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><ul id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_ul2948746"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li13770327204019">Oracle</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li12778821204114">Teradata</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li1111401492914">Netezza</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li1762162652911">MySQL</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li866114211289">DB2</li></ul>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p28537054">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p29800032">--source-db <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i66873698">Oracle</em>(or)</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p64992378">-S <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i48060496">Oracle</em></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row41197500"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p49889289204153">--input-folder</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1100849520427">-I</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p52521725204213">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p48663242">Input folder containing Teradata or Oracle scripts</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p4053445203721">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p49408540">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p24090318204419">--input-folder <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i15486272204419">/home/testmigration/Documentation/input</em></p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p5158722204419">(or)</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p46428501204419">-I <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i15203331204419">/home/testmigration/Documentation/input</em></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row9729102204527"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p41762729204545">--output-folder</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p50097247204552">-O</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p41768365204527">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p27794438204527">Output folder where the migrated scripts are saved</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p36757011204527">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p24527933204527">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p40605547204527">--output-folder <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i22586672204718">/home/testmigration/Documentation/output</em>(or)-O <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i24012676204718">/home/testmigration/Documentation/output</em></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row1355895717276"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1826817467379">--application-lang</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p19268134613710">-A</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1526824623717">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1689874414289">Application language parser used for migration</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1696310123220"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b49284271220">SQL</strong>: Migrate SQL schemas or scripts in SQL files.</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p193841219173913"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b1177112131131">Perl</strong>: Migrate <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b8426526135">BTEQ</strong> or <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b476872913312">SQL_LANG</strong> scripts in Perl files.</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><ul id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_ul17314223104013"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li13314202317402">SQL</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li065612254403">Perl</li></ul>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p162682467374">SQL</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1505606419">--application-lang Perl</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p13121471406">or</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p122681546203714">-A <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i73956291236">Perl</em></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row6113122420487"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p26412602">--conversion-type</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p17794058204815">-M</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p25704369204823">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p577347120487">Migration type. Set this parameter based on input scripts.</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1515621815366"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b676673217414">Bulk</strong>: Migrate DML and DDL scripts.</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p186794022813"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b187507613511">BLogic</strong>: Migrate service logic, such as procedures and functions.</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p415618182367"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b147513279517">BLogic</strong> is used only for Oracle PL/SQL.</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><ul id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_ul7259660204849"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li57800760204849"><a name="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li57800760204849"></a><a name="en-us_topic_0219651208_en-us_topic_0213040018_li57800760204849"></a>Bulk</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li6200471420490"><a name="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li6200471420490"></a><a name="en-us_topic_0219651208_en-us_topic_0213040018_li6200471420490"></a>BLogic</li></ul>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p3034927820487">Bulk</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p744995">--conversion-type <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i6704956">bulk</em></p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p60344611">or</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p6230592">-M <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i56075332">bulk</em></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row571249020485"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p12274864204928">--log-folder</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p55551967204934">-L</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p4785122020485">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p5074358920485">Log file path</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1659007620485">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p161887820485">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p6402030920485">--log-folder <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i31440274205017">/home/testmigration/Documentation</em>(or)-L <em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i35837430205017">/home/testmigration/Documentation</em></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row162921952133617"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p4293135211363">--version-number</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p15293135263610">-VN</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p6293175218369">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1929395212365">Oracle specified parameter</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1529320524364">Oracle</p>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p15293145213617">N/A</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p52931152153618">--version-number</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1632918173915">or</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p2374151103915">-V1R8_330</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_row15311014612"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.1 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p15129828161812">--target-db</p>
</td>
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.8.1.2 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p1812912871812">-T</p>
</td>
<td class="cellrowborder" valign="top" width="11%" headers="mcps1.3.3.2.2.8.1.3 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p112916285180">String</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.3.2.2.8.1.4 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p412912812182">Target database</p>
</td>
<td class="cellrowborder" valign="top" width="14.790000000000001%" headers="mcps1.3.3.2.2.8.1.5 "><ul id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_ul27812398"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li48984995">gaussdbT</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_li38211774">gaussdbA</li></ul>
</td>
<td class="cellrowborder" valign="top" width="10.73%" headers="mcps1.3.3.2.2.8.1.6 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p8145970">gaussdbA</p>
</td>
<td class="cellrowborder" valign="top" width="24.48%" headers="mcps1.3.3.2.2.8.1.7 "><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p55843827">--target-db gaussdbT (or)</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p32832395"><em id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_i27056104">-T gaussdbT</em></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_section31045820"><h4 class="sectiontitle">Usage Guidelines</h4><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p6421200111538">It is mandatory to specify the source database, input folder path, and output folder path, and optional to specify the migration type and log path.</p>
<div class="note" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_note27163470102314"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_p43144638102314">If no log path is specified, DSC creates the <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b195020151885">log</strong> folder under <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b1452225884">TOOL_HOME</strong> to store logs.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_section19397641131210"><h4 class="sectiontitle">Example</h4><pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_screen20423017"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_b10367513">./runDSC.sh --source-db</strong> Oracle <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_b26198756">--input-folder</strong> opt/DSC/DSC/input/oracle/ --output-folder /opt/DSC/DSC/output/ --log-folder /opt/DSC/DSC/log/ <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_b39976034">--application-lang </strong>SQL <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_b24239987">--conversion-type</strong> bulk <strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_b18396011123513">--target-db</strong> gaussdbT</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_en-us_topic_0213040018_section17357516135533"><h4 class="sectiontitle">System Response</h4><pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_screen53925429339">********************** 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>
<div class="note" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_note411124617337"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p9347165893311">If there is no sql file present in the input folder, then the following message is displayed in console:</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p113562811349"><span><img id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_image1366317241810" src="figure/en-us_image_0000001188362656.png"></span></p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_section538442413347"><h4 class="sectiontitle">Environment Creation and Restoration Procedure (database and database user)</h4><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p2082917596349"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b1675785474710"><span id="EN-US_TOPIC_0000001188362520__text1124692475011">GaussDB(DWS)</span>: Database Creation and Schema Setup</strong></p>
<ol id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_ol18294590343"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li5829105963419"><span>Log into postgres:</span><p><pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_screen178294594344">gsql -p &lt;port&gt; -d postgres
drop database &lt;database name&gt;;
create database &lt;database name&gt;;
\c &lt;database name&gt;
GRANT ALL PRIVILEGES ON DATABASE &lt;database name&gt; TO &lt;user&gt;;
grant database to &lt;user&gt;;\q
gsql -p &lt;port&gt; -d &lt;database name&gt; -U &lt;user&gt; -W &lt;password&gt; -h &lt;IP&gt; -f
drop database &lt;database name&gt;;
create database &lt;database name&gt;;
\c &lt;database name&gt;;
GRANT ALL PRIVILEGES ON DATABASE &lt;database name&gt; TO &lt;user&gt;;
gsql -p &lt;port&gt; -d &lt;database name&gt; -U &lt;user&gt; -W &lt;password&gt; -f</pre>
</p></li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li98291459133411"><span>Run all files in setup.</span></li></ol>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p148291359173413"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b1871642515536">Commands</strong>:</p>
<pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_screen582915911342">sh runDSC.sh -S oracle -M blogic -I &lt;input path&gt;
sh runDSC.sh -S oracle -M bulk -I &lt;input path&gt;</pre>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p1830125963417"><strong id="EN-US_TOPIC_0000001188362520__b894473363810">Configuration Details</strong></p>
<ol id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_ol9830135933420"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li2830359133416"><span>Set the value of <strong id="EN-US_TOPIC_0000001188362520__b1014313373919">GaussDBSQLExec</strong> to <strong id="EN-US_TOPIC_0000001188362520__b79304101392">True</strong>, and update the <strong id="EN-US_TOPIC_0000001188362520__b1433623033910">gaussdb.properties</strong> file.</span></li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li283015598348"><span>Create a user (T) and a database (A). Add all schemas.</span></li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_section1169331364218"><h4 class="sectiontitle">Verification After Migration</h4><p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p19830759163419">After DSC converts the source sql files, execute the converted files on target gaussdb and provide a report with details of number of statements succeeded and failed.</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p483017591347">After the DSC finishes the translation, it will invoke (controlled through a configuration item) post migration verification script. The verification script (for details about the configuration, see the configuration file) is connected to the target GaussDB database and executed.</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p6830859163414">The post migration verification script will connect to the target gauss database (details are configured in a configuration file) and executes the scripts.</p>
<ol id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_ol1983055993416"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li9830125943412"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b644612164816">application.properties</strong> in config folder<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p483055983411">Execute migrated script on Gauss DB: true/false, default value = false</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p15830115913411">executesqlingauss=true</p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p98301159163417">true: It will execute the migrated script on gaussdb</p>
</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li1983015923415"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b194096154812">gaussdb.properties</strong> in config folder<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p1483015910348">#Target Database configurations</p>
<pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_screen07451149133520">#gauss database user with all privileges
gaussdb-user=
gaussdb-port=
#Database name for GaussDBA
gaussdb-name=
#gaussdb ip
gaussdb-ip=</pre>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p88306599342"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_b18830105917346"><u id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_u118307594349">Dependency between gsql and zsql clients</u></strong></p>
<ol type="a" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_ol138306595346"><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li583075919342">gsql (<span id="EN-US_TOPIC_0000001188362520__text17231721145018">GaussDB(DWS)</span>) is required for executing scripts on GaussDB(DWS). Therefore, to ensure the smooth running of DSC, DSC is required to run on a node installed with a GaussDB(DWS) instance or client (gsql), and the user that performs verification must have the permission for executing commands using gsql or zsql.</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li28301059153418">Since the Gauss DB Instance/Client can be installed on a linux OS only, this can be used to verify functionality only on a linux environment.</li><li id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_li583055993417">To execute the gsql command on a remote GaussDB instance, it is advised to add the client system IP/hostname in the following configuration file of Gauss DB instance.<pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_screen3666458309">/home/gsmig/database/coordinator
---pg_hba.conf</pre>
</li></ol>
</li></ol>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p2830175917349"><strong id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_b62051149561"><u id="EN-US_TOPIC_0000001188362520__en-us_topic_0237712276_u2358199165615">Response</u></strong></p>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p9830175903418"><span id="EN-US_TOPIC_0000001188362520__text10892754124514">GaussDB(DWS)</span></p>
<pre class="screen" id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_screen1483014593342">********************** Verification Started ******************************
Sql script execution on Gauss DB start time : Wed Jan 22 17:27:07 CST 2020
Sql script execution on Gauss DB end time : Wed Jan 22 17:27:44 CST 2020
Summary of Verification :
==================================================================================================================================
Statement | Total | Passed | Failed | Success Rate(%)
-----------------------------------------------------------------------------------------------------------------------------------
COMMENT | 15 | 15 | 0 | 100
CREATE VIEW | 4 | 3 | 1 | 75
CREATE INDEX | 4 | 3 | 1 | 75
CREATE TABLE | 6 | 6 | 0 | 100
ALTER TABLE | 3 | 3 | 0 | 100
---------------------------------------------------------------------------------------------------------------------------------
Total | 32 | 30 | 2 | 93
Gauss Execution Log file : /home/gsmig/18Jan/DSC/DSC/log/gaussexecutionlog.log
Gauss Execution Error Log file : /home/gsmig/18Jan/DSC/DSC/log/gaussexecutionerror.log
Verification finished in 38 seconds
********************** Verification Completed ****************************</pre>
<p id="EN-US_TOPIC_0000001188362520__en-us_topic_0219651208_p593018256347"></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_mt_0183.html">Command Reference</a></div>
</div>
</div>