forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: luhuayi <luhuayi@huawei.com> Co-committed-by: luhuayi <luhuayi@huawei.com>
42 lines
10 KiB
HTML
42 lines
10 KiB
HTML
<a name="EN-US_TOPIC_0000001860198753"></a><a name="EN-US_TOPIC_0000001860198753"></a>
|
|
|
|
<h1 class="topictitle1">Sequence Management</h1>
|
|
<div id="body1584526252528"><div class="section" id="EN-US_TOPIC_0000001860198753__section13475528329"><h4 class="sectiontitle">Creating a Sequence</h4><ol id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_ol39613592028"><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li185623420712"><span>In the <strong id="EN-US_TOPIC_0000001860198753__b777220242044">Object Browser</strong> pane, right-click <strong id="EN-US_TOPIC_0000001860198753__b55561740646">Sequences</strong> under the particular schema where you want to create the sequence and select <strong id="EN-US_TOPIC_0000001860198753__b028245412417">Create Sequence</strong>. The <strong id="EN-US_TOPIC_0000001860198753__b10931526650">Create New Sequence</strong> dialog box is displayed.</span><p><p id="EN-US_TOPIC_0000001860198753__p6624185112220"><span><img id="EN-US_TOPIC_0000001860198753__image18661615438" src="figure/en-us_image_0000001813599152.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001860198753__p53391214144015"></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li20971059226"><span>Provide information to create a sequence:</span><p><ol type="a" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_ol485234013913"><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li1585212405910">Enter a name in the <strong id="EN-US_TOPIC_0000001860198753__b198100141568">Sequence Name</strong> field.</li></ol>
|
|
<div class="note" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_note9920142154518"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_p492114224516">Select the <strong id="EN-US_TOPIC_0000001860198753__b611695912611">Case</strong> check box to retain the capitalization of the text entered in <strong id="EN-US_TOPIC_0000001860198753__b8906172473">Sequence Name</strong> field. For example, if the entered sequence name is <strong id="EN-US_TOPIC_0000001860198753__b15587114176">Employee</strong>, then the sequence name is created as "Employee".</p>
|
|
</div></div>
|
|
<ol type="a" start="2" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_ol13851124016919"><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li118471740896">Enter the minimum value in the <strong id="EN-US_TOPIC_0000001860198753__b61085521815">Minimum Value</strong> field.</li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li13847940992">Enter the increase step value in the <strong id="EN-US_TOPIC_0000001860198753__b455615200915">Increment By</strong> field.</li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li20848640499">Enter maximum value in the <strong id="EN-US_TOPIC_0000001860198753__b555118391192">Maximum Value</strong> field.<div class="note" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_note195896349106"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_p1459016344105">The maximum and minimum value should be between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li48495409914">Enter the start value of the sequence in <strong id="EN-US_TOPIC_0000001860198753__b7151227171010">Start Value</strong> field.</li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li1784920409914">Enter the cache information in <strong id="EN-US_TOPIC_0000001860198753__b575014641012">Cache</strong> field. The cache value denotes the number of sequences stored in the memory for quick access.</li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li1885011409915">Select the <strong id="EN-US_TOPIC_0000001860198753__b595633013115">Cycle</strong> field to recycle sequences after the number of sequences reaches either the maximum or minimum value.<div class="note" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_note168467550136"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_p158461455151319">The schema name auto-populates in the <strong id="EN-US_TOPIC_0000001860198753__b10367114910115">Schema</strong> field.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li585118402910">Select the table from the <strong id="EN-US_TOPIC_0000001860198753__b31073914129">Table</strong> drop-down list.</li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li1485111400915">Select the column from the <strong id="EN-US_TOPIC_0000001860198753__b16812173117124">Column</strong> drop-down list.</li></ol>
|
|
</p></li><li id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_li165071542135019"><span>Click <strong id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_b14433102011482">Finish</strong>.</span><p><div class="p" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_p89726217518">The status bar displays the status of the completed operation.<div class="note" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_note112661910154915"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264927_p826721064910">On the <strong id="EN-US_TOPIC_0000001860198753__b1580193318188">SQL Preview</strong> tab, you can view the SQL query automatically generated for the inputs provided.</p>
|
|
</div></div>
|
|
</div>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001860198753__section16262725876"><h4 class="sectiontitle">Support for Sequence DDL</h4><p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_p16885165644515">Data Studio allows you to display sequence DDL and export sequence DDL, including <strong id="EN-US_TOPIC_0000001860198753__b1457012139313">Show DDL</strong>, <strong id="EN-US_TOPIC_0000001860198753__b319114171336">Export DDL</strong>, and <strong id="EN-US_TOPIC_0000001860198753__b540511251633">Export DDL and Data</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001860198753__p750903111815">In the <strong id="EN-US_TOPIC_0000001860198753__b15588175985519">Object Browser</strong> pane, right-click the selected table.</p>
|
|
<p id="EN-US_TOPIC_0000001860198753__p18597163320810">To check DDL statement, choose <strong id="EN-US_TOPIC_0000001860198753__b1725913198569">Show DDL</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_p9939192171511">To export DDL statements, choose <strong id="EN-US_TOPIC_0000001860198753__b10302154005616">Export DDL</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_p11939142151510">To export DDL and SELECT statements, choose <strong id="EN-US_TOPIC_0000001860198753__b1283820165714">Export DDL and Data</strong></p>
|
|
<p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_p939154181613">The procedure is shown in the following figure.</p>
|
|
<p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_p14148314155213"><span><img id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_image3147131475220" src="figure/en-us_image_0000001813439364.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001860198753__p1422205254416"></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_note1880132922017"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001860198753__en-us_topic_0185264735_p17816294201">Only the sequence owner, system administrator, or a user who has the select permission on the sequence can perform the preceding operations.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001860198753__section47211761196"><h4 class="sectiontitle">Granting/Revoking a Privilege</h4><ol id="EN-US_TOPIC_0000001860198753__ol1992165919"><li id="EN-US_TOPIC_0000001860198753__li12951610913"><span>Right-click selected sequence and select <strong id="EN-US_TOPIC_0000001860198753__b497404872212">Grant/Revoke</strong>. The <strong id="EN-US_TOPIC_0000001860198753__b1490167910">Grant/Revoke</strong> dialog box is displayed.</span></li><li id="EN-US_TOPIC_0000001860198753__li12915161912"><span>Select the objects to grant/revoke privilege from the <strong id="EN-US_TOPIC_0000001860198753__b45699525581225">Object Selection</strong> tab and click <strong id="EN-US_TOPIC_0000001860198753__b207840308481225">Next</strong>.</span></li><li id="EN-US_TOPIC_0000001860198753__li131014161391"><span>Select the <strong id="EN-US_TOPIC_0000001860198753__b1623720571227">role</strong> from the Role drop-down list in the <strong id="EN-US_TOPIC_0000001860198753__b1523711578227">Privilege Selection</strong> tab. Select <strong id="EN-US_TOPIC_0000001860198753__b202371157142215">Grant/Revoke</strong> in the <strong id="EN-US_TOPIC_0000001860198753__b192381557172216">Privilege Selection</strong> tab.</span></li><li id="EN-US_TOPIC_0000001860198753__li91010162916"><span>On the <strong id="EN-US_TOPIC_0000001860198753__b2331472315">SQL Preview</strong> tab, you can check the automatically generated SQL query.</span></li><li id="EN-US_TOPIC_0000001860198753__li1119167912"><span>Click <strong id="EN-US_TOPIC_0000001860198753__b101116164912">Finish</strong>.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001860198753__section20424139111016"><h4 class="sectiontitle">Dropping a Sequence</h4><p id="EN-US_TOPIC_0000001860198753__p9390172385110">Right-click the selected sequence and select <strong id="EN-US_TOPIC_0000001860198753__b208057772413">Drop Sequence</strong>. The <strong id="EN-US_TOPIC_0000001860198753__b1849617272243">Drop Sequence</strong> dialog box is displayed. Click <strong id="EN-US_TOPIC_0000001860198753__b741614548242">Yes</strong> to drop the sequence.</p>
|
|
<p id="EN-US_TOPIC_0000001860198753__p11837453516">Right-click the selected sequence and select <strong id="EN-US_TOPIC_0000001860198753__b131625243255">Drop Sequence Cascade</strong>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_012.html">Database Management</a></div>
|
|
</div>
|
|
</div>
|
|
|