forked from docs/doc-exports
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>
223 lines
33 KiB
HTML
223 lines
33 KiB
HTML
<a name="EN-US_TOPIC_0000001819336057"></a><a name="EN-US_TOPIC_0000001819336057"></a>
|
|
|
|
<h1 class="topictitle1">Teradata Perl Configuration</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p42011119196">Teradata Perl parameters are used to customize rules for Teradata Perl script migration.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p46411613161111">Open the <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b23331103332342">perl-migration.properties</strong> file in the <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b76396539432342">config</strong> folder and set parameters in <a href="#EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_table60771938143352">Table 1</a> as required.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_note63736430145328"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul777814336172"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li12436325122015">Parameter values are case-insensitive.</li><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li1185115172014">You can modify the values of the following two parameters <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b96685658432342">db-bteq-tag-name</strong> and <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b2323582832342">db-tdsql-tag-name</strong> parameters in the following table:</li></ul>
|
|
</div></div>
|
|
<div class="p" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p18568838113813">
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_table60771938143352"></a><a name="en-us_topic_0000001706105017_en-us_topic_0000001443528629_table60771938143352"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_table60771938143352" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the perl-migration.properties file</caption><thead align="left"><tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row57642437143352"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.4.1.2.6.1.1"><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p12555135512544"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b1255525565410">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23%" id="mcps1.3.4.1.2.6.1.2"><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p75551955155410"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b16555145510549">Description</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.1.2.6.1.3"><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p6555855145420"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b318113181368">Value Range</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.1.2.6.1.4"><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1155511556544"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b8555175513549">Default</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.4.1.2.6.1.5"><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p5557255195415"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b13370750699">Example</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row3194192917161"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul877734013166"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li147773406162">db-bteq-tag-name</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p17786104172">Scripts to be processed in Perl files.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1428675031713"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b31009975032342">BTEQ</strong>: Only the scripts under the <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b134570719032342">BTEQ</strong> tag are processed.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul107771140151613"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li15777204011619">bteq</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p167771840131611">bteq</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p187771740191613">db-bteq-tag-name=bteq</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row319933391618"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul126930174113"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li132693018413">db-tdsql-tag-name</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p123875347186">Only the scripts under the <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b189612416432342">db-tdsql-tag-name</strong> tag are processed.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p018172610185"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b81172725132342">SQL_LANG:</strong> Only the scripts under the <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b129693177732342">SQL_LANG</strong> tag are processed.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p0449231712">sql_lang</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p15449233711">sql_lang</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p19441223777">db-tdsql-tag-name=sql_lang</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row14984021918"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul726616441190"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li182661044181919">add-timing-on</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p15266104471913">Whether to enable the insertion of scripts to calculate execution time.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p7266204461914">If it is enabled, the script will be added to each input file.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul14266134415194"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li8266124481912">true</li><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li726618449195">false</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1626610448197">false</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1626611444198">add-timing-on=true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row5661958172016"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul925940122114"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li12591605213">remove-intermediate-files</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p112597062119">Whether to delete the intermediate SQL file generated by the DSC after the migration is complete.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p6259160152115">The intermediate files contain the <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b173629195332342">BTEQ</strong> and <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b2695276132342">SQL_LANG</strong> syntax in SQL files. These files are used as input for DSC.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p7259170112110"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b16301912232342">true</strong>: deletes the intermediate files.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p62591000219"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b84951111232342">false</strong>: does not delete the intermediate files.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul725915022111"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li19259160182115">true</li><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li925960112120">false</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p925919018215">true</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p825913014217">remove-intermediate-files=true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row652725655810"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul164848265917"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li1148411265916">migrate-variables</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p125391855133812">Whether to enable the migration of Perl variables containing SQL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p8451133223911">Perl files can contain Perl variables with SQL statements. These variables are executed by using the <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b50275550532342">PREPARE</strong> and <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b213329830832342">EXECUTE</strong> statement in Perl. DSC can extract SQL statements from Perl variables and migrate them.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p8315816114111"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b17175931532342">true</strong>: enables the migration of <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b186259558132342">Perl</strong> variables containing SQL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p182693710424"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b194843484432342">false</strong>: disables the migration of <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b132444624732342">Perl</strong> variables containing SQL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p19748201415566">Example 1:</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p374116166116"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b41900971932342">migrate-variables</strong> is set to <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b104506273132342">true</strong> and input is as follows:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_screen1471415455207"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="err">$</span><span class="n">V_SQL</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ss">"CT X1(C1 INT,C2 CHAR(30))"</span><span class="p">;</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p090561081119"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b75064378832342">Output</strong></p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_screen434451132016"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="k">CREATE</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">X1</span><span class="p">(</span><span class="n">C1</span><span class="w"> </span><span class="nb">INT</span><span class="p">,</span><span class="n">C2</span><span class="w"> </span><span class="nb">CHAR</span><span class="p">(</span><span class="mi">30</span><span class="p">));</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p319019532020">Example 2:</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p93455512317"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b1087116711178">Input</strong></p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_screen034755173116"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><span class="err">$</span><span class="n">onesql</span><span class="w"> </span><span class="o">=</span><span class="ss">"SELECT trim(tablename) from dbc.tables </span>
|
|
<span class="ss"> WHERE databasename = '${AUTO_DQDB}' and tablename like 'V_%' </span>
|
|
<span class="ss"> order by 1;"</span><span class="p">;</span>
|
|
<span class="w"> </span><span class="err">$</span><span class="n">sth_rundq</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">$</span><span class="n">dbh</span><span class="o">-></span><span class="n">execute_query</span><span class="p">(</span><span class="err">$</span><span class="n">onesql</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p19351165113314"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b1668061016179">Output</strong></p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_screen103532051143118"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span></pre></div></td><td class="code"><div><pre><span></span><span class="w"> </span><span class="err">$</span><span class="n">onesql</span><span class="w"> </span><span class="o">=</span><span class="ss">"SELECT</span>
|
|
<span class="ss"> TRIM( tablename )</span>
|
|
<span class="ss"> FROM</span>
|
|
<span class="ss"> dbc.tables</span>
|
|
<span class="ss"> WHERE</span>
|
|
<span class="ss"> databasename = '${AUTO_DQDB}'</span>
|
|
<span class="ss"> AND tablename LIKE 'V_%'</span>
|
|
<span class="ss"> ORDER BY</span>
|
|
<span class="ss"> 1</span>
|
|
<span class="ss">;</span>
|
|
|
|
<span class="ss">"</span><span class="p">;</span>
|
|
<span class="w"> </span><span class="err">$</span><span class="n">sth_rundq</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">$</span><span class="n">dbh</span><span class="o">-></span><span class="n">execute_query</span><span class="p">(</span><span class="err">$</span><span class="n">onesql</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul9791181702"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li117911482013">true</li><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li11791981909">false</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p4793481602">true</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1352795615589">migrate-variables=true</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row196578020233"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul8844121102315"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li0844101162312">logging-level</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p7844151172318">Logging level of Teradata Perl migration log files.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1284411202315"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b86359663832342">error</strong>: Log only errors.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p19844151202312"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b81460046032342">warning</strong>: Log errors and warnings.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p78443114237"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b138039544732342">info</strong>: Log errors, warnings, and activity information. This level contains all log information.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul15844419232"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li6845131102314">error</li><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li684512122317">warning</li><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li1484514132317">info</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1384517110232">info</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p188451518235">logging-level=info</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row12241104414228"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul14362114715221"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li236214711227">log-file-count</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p19362154722215">Maximum number of log files retained, including the log files in use and archived log files.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p17362247182216">If the number of log files exceeds the upper limit, the earliest files will be deleted until the new log files are successfully archived.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p113621478224">3 - 10</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p836220471228">5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p83621478227">log-file-count=10</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row44821045152211"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul20362114711220"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li2036214472221">log-file-size</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p2362154712217">Maximum file size.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p153621447152211">Upon reaching the specified size, a file is archived by adding a timestamp to the file name.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p636294762214"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b9362184711226">Example:</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_screen1136218475222">perlDSC_2018-07-08_16_12_08.log</pre>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p15362947142211">After the archiving, a new log file <em id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_i120892917032342">perlDSC.log</em> with a timestamp is generated.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p14362194710223">1MB - 10MB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p8362184710228">5MB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p13362154717220">log-file-size=10MB</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_row07910312319"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.1.2.6.1.1 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul10577932151516"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li357712329159">migrate-executequery</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23%" headers="mcps1.3.4.1.2.6.1.2 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p159631453419">Whether to enable the migration of <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b116631079932342">execute_query</strong> containing SQL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p2243162312420"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b58389635932342">true</strong>: enables the migration of <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b73439195732342">execute_query</strong> containing SQL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p213418371413"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b55241362532342">false</strong>: disables the migration of <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b5808140332342">execute_query</strong> containing SQL statements.</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p95832262110">The following is an example:</p>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p1576910107218"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b196462858632342">migrate-executequery</strong> is set to <strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b167430394932342">true</strong> and input is as follows:</p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_screen9894112112215"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">my</span><span class="w"> </span><span class="err">$</span><span class="n">rows1</span><span class="o">=</span><span class="err">$</span><span class="n">conn1</span><span class="o">-></span><span class="n">execute_query</span><span class="p">(</span><span class="ss">"sel ${selectclause} from ${databasename}.${tablename};</span>
|
|
<span class="ss"> "</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p18264466216"><strong id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_b99196880332342">Output</strong></p>
|
|
<div class="codecoloring" codetype="Sql" id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_screen1133458122120"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">my</span><span class="w"> </span><span class="err">$</span><span class="n">rows1</span><span class="o">=</span><span class="err">$</span><span class="n">conn1</span><span class="o">-></span><span class="n">execute_query</span><span class="p">(</span><span class="ss">"SELECT</span>
|
|
<span class="ss"> ${selectclause}</span>
|
|
<span class="ss"> FROM</span>
|
|
<span class="ss"> ${databasename}.${tablename}</span>
|
|
<span class="ss">;"</span><span class="p">);</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.1.2.6.1.3 "><ul id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_ul20221155512166"><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li12221195519165">true</li><li id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_li277595721619">false</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.1.2.6.1.4 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p129489311339">true</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.4.1.2.6.1.5 "><p id="EN-US_TOPIC_0000001819336057__en-us_topic_0000001706105017_en-us_topic_0000001443528629_p179481731334">migrate-executequery =true</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0012.html">Configuring DSC</a></div>
|
|
</div>
|
|
</div>
|
|
|