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>
122 lines
16 KiB
HTML
122 lines
16 KiB
HTML
<a name="EN-US_TOPIC_0000001813438776"></a><a name="EN-US_TOPIC_0000001813438776"></a>
|
|
|
|
<h1 class="topictitle1">View Management</h1>
|
|
<div id="body1584526252528"><div class="section" id="EN-US_TOPIC_0000001813438776__section1637915733319"><h4 class="sectiontitle">Creating a View</h4><p id="EN-US_TOPIC_0000001813438776__p4920392349">Right-click the <strong id="EN-US_TOPIC_0000001813438776__b1131919345317">Views</strong> and select <strong id="EN-US_TOPIC_0000001813438776__b14164426173116">Create View</strong>. The DDL template for the view is displayed in the <strong id="EN-US_TOPIC_0000001813438776__b567011171219">SQL Terminal</strong> tab.</p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p818313518347"><span><img id="EN-US_TOPIC_0000001813438776__image95896113411" src="figure/en-us_image_0000001860318985.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p12697181635913"></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813438776__section123277313353"><h4 class="sectiontitle">Granting/Revoking a Privilege</h4><ol id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264662_ol54022224212"><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264662_li222516181158"><span>Right-click the views group and select <strong id="EN-US_TOPIC_0000001813438776__b2027216486323">Grant/Revoke</strong>. The <strong id="EN-US_TOPIC_0000001813438776__b15161950113218">Grant/Revoke</strong> dialog box is displayed.</span></li><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264662_li1851919178165"><span>Select the objects to grant/revoke a privilege from the <strong id="EN-US_TOPIC_0000001813438776__b9881916193315">Object Selection</strong> tab and click <strong id="EN-US_TOPIC_0000001813438776__b35591021173311">Next</strong>.</span></li><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264662_li1285194971613"><span>Select a role from the <strong id="EN-US_TOPIC_0000001813438776__b178921419111212">Role</strong> drop-down list in the <strong id="EN-US_TOPIC_0000001813438776__b058614241348">Privilege Selection</strong> tab. Select <strong id="EN-US_TOPIC_0000001813438776__b13746133343411">Grant/Revoke</strong> in the <strong id="EN-US_TOPIC_0000001813438776__b20887194019349">Privilege Selection</strong> tab.</span></li><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264662_li1366271912272"><span>On the <strong id="EN-US_TOPIC_0000001813438776__b3339124483418">SQL Preview</strong> tab, you can check the automatically generated for the inputs provided.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813438776__section11269314154616"><h4 class="sectiontitle">Viewing the DDL</h4><p id="EN-US_TOPIC_0000001813438776__p1033584719552">Right-click the selected view and select <strong id="EN-US_TOPIC_0000001813438776__b8481174412362">Show DDL</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_p19355116195214">The DDL is displayed in a new <strong id="EN-US_TOPIC_0000001813438776__b7800212203710">SQL Terminal</strong> tab. You must refresh the <strong id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_b75121165314">Object Browser</strong> to view the latest DDL.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813438776__section10188153814447"><h4 class="sectiontitle">Exporting the View DDL</h4><p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264706_p62435929">Right-click the selected view and select <strong id="EN-US_TOPIC_0000001813438776__b2735181763820">Export DDL</strong>.</p>
|
|
<ol id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264706_ol24145451"><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264706_li41061555"><span>In the <strong id="EN-US_TOPIC_0000001813438776__b197961225387">Object Browser</strong> pane, right-click the selected schema and select <strong id="EN-US_TOPIC_0000001813438776__b117970222386">Export DDL</strong>.</span><p><p id="EN-US_TOPIC_0000001813438776__p14770144218374">You need to customize the export path. To compress data, select <strong id="EN-US_TOPIC_0000001813438776__b1930244512381">.zip</strong> </p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p623194023315"><span><img id="EN-US_TOPIC_0000001813438776__image1021016599340" src="figure/en-us_image_0000001860199145.png" width="518.7" height="253.43150000000003" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p18861159132118"></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264706_p559426">You must click <strong id="EN-US_TOPIC_0000001813438776__b125114517389">I agree</strong> under <strong id="EN-US_TOPIC_0000001813438776__b25111751163818">Security Disclaimer</strong>, then click <strong id="EN-US_TOPIC_0000001813438776__b1351145113385">OK</strong>. You can disable the security disclaimer. After the disclaimer is disabled, it will not be displayed when you export the DDL. For details, see <a href="DWS_DS_005.html#EN-US_TOPIC_0000001813438860__table1510418570339">Table 1</a>.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264706_li25693751192755"><span>Click <strong id="EN-US_TOPIC_0000001813438776__b165792059133810">OK</strong>. The operation progress is displayed on the status bar in the lower right corner. </span><p><p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264706_p40980350192916">The <strong id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264706_b33278836192916">Export</strong> message and status bar display the status of the completed operation.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001813438776__note143807794910"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001813438776__ul73811271493"><li class="text" id="EN-US_TOPIC_0000001813438776__li13381147204912">To cancel the export operation, double-click the status to open the <strong id="EN-US_TOPIC_0000001813438776__b19958124203919">Progress View</strong> tab and click <span><img id="EN-US_TOPIC_0000001813438776__image3958194143919" height="16.9575" src="figure/en-us_image_0000001813439284.jpg" width="17.955000000000002" title="Click to enlarge" class="imgResize"></span>.</li><li id="EN-US_TOPIC_0000001813438776__li163812711497">If the view name contains characters that are not supported by Windows, the name of the exported file is different from the view name.</li></ul>
|
|
</div></div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001813438776__table1366135204812" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001813438776__row1566252144817"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.2.3.1.4.1.1"><p id="EN-US_TOPIC_0000001813438776__p1766145274811"><strong id="EN-US_TOPIC_0000001813438776__b166105211488">Database Encoding</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.2.3.1.4.1.2"><p id="EN-US_TOPIC_0000001813438776__p1967175254815"><strong id="EN-US_TOPIC_0000001813438776__b1967165264814">File Encoding</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.3.2.2.3.1.4.1.3"><p id="EN-US_TOPIC_0000001813438776__p1067952154819"><strong id="EN-US_TOPIC_0000001813438776__b10931124513917">Support for Exporting a DDL</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001813438776__row06785214820"><td class="cellrowborder" rowspan="3" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p12671526481">UTF-8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p26719527485">UTF-8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.3 "><p id="EN-US_TOPIC_0000001813438776__p66718528487">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row116717529481"><td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p2673529481">GBK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p367552124817">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row186735204814"><td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p1767652104816">LATIN1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p8685524487">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row9681752144815"><td class="cellrowborder" rowspan="3" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p4683521484">GBK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p56865254810">GBK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.3 "><p id="EN-US_TOPIC_0000001813438776__p14682524485">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row46845215483"><td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p46875234813">UTF-8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p12681552164816">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row2684523483"><td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p1168175216487">LATIN1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p1368952194812">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row3681252194819"><td class="cellrowborder" rowspan="3" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p13681852114820">LATIN1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p76925224819">LATIN1</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.3.2.2.3.1.4.1.3 "><p id="EN-US_TOPIC_0000001813438776__p126955215485">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row116917521480"><td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p769452174810">GBK</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p19691552164814">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001813438776__row36917524489"><td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.1 "><p id="EN-US_TOPIC_0000001813438776__p669145215482">UTF-8</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.4.3.2.2.3.1.4.1.2 "><p id="EN-US_TOPIC_0000001813438776__p1369652164813">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813438776__section161121750204615"><h4 class="sectiontitle">Setting the Schema for a View</h4><ol id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_ol3972940"><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_li35756461"><span>Right-click the selected view and select <strong id="EN-US_TOPIC_0000001813438776__b89952021114119">Set Schema</strong>. The <strong id="EN-US_TOPIC_0000001813438776__b93484394115">Set Schema</strong> dialog box is displayed.</span><p><p id="EN-US_TOPIC_0000001813438776__p5562189577"><span><img id="EN-US_TOPIC_0000001813438776__image39614917575" src="figure/en-us_image_0000001860318989.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p01321458201220"></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_li38139549"><span>Select the required schema from the drop-down list and click <strong id="EN-US_TOPIC_0000001813438776__b19717231194513">OK</strong>.</span><p><p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_p129532513576">The status bar displays the status of the completed operation.</p>
|
|
<p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_p2295787">If the required schema contains a view with the same name as the current view, then Data Studio does not allow setting the schema for the view.</p>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813438776__section794262944618"><h4 class="sectiontitle">Viewing the Properties of a View</h4><p id="EN-US_TOPIC_0000001813438776__p17931442165320">Right-click the selected View and select <strong id="EN-US_TOPIC_0000001813438776__b9744115894713">Properties</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_p36081152105214">The properties (<strong id="EN-US_TOPIC_0000001813438776__b1377971917133">General</strong> and <strong id="EN-US_TOPIC_0000001813438776__b372942012139">Columns</strong>) of the selected view is displayed in different tabs.</p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p1722432068"><span><img id="EN-US_TOPIC_0000001813438776__image2084518338543" src="figure/en-us_image_0000001860199133.png" width="492.1" height="92.0227" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p79884326543"><span><img id="EN-US_TOPIC_0000001813438776__image92825476545" src="figure/en-us_image_0000001813599072.png" width="492.1" height="123.3043" title="Click to enlarge" class="imgResize"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p671111194712"></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p24155581574"></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_note177065572528"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001813438776__en-us_topic_0185264932_p1270635785213">If you modify the properties of a view that is already opened, then refresh and open the properties of the view again to check the updated information on the same opened window.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813438776__section327814436465"><h4 class="sectiontitle">Renaming a View</h4><ol id="EN-US_TOPIC_0000001813438776__ol166391839175817"><li id="EN-US_TOPIC_0000001813438776__li11639153965817"><span>Right-click the selected view and select <strong id="EN-US_TOPIC_0000001813438776__b18374153811496">Rename View</strong>. The <strong id="EN-US_TOPIC_0000001813438776__b13678115111497">Rename View</strong> dialog box is displayed.</span><p><p id="EN-US_TOPIC_0000001813438776__p995511610596"><span><img id="EN-US_TOPIC_0000001813438776__image940019718592" src="figure/en-us_image_0000001813599068.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p1246118491285"></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001813438776__li3639183919589"><span>Enter the required name for the view and click <strong id="EN-US_TOPIC_0000001813438776__b4503152765016">OK</strong>. You can view the renamed view in the <strong id="EN-US_TOPIC_0000001813438776__b39738456508">Object Browser</strong>.</span><p><p id="EN-US_TOPIC_0000001813438776__p763917393581">The status bar displays the status of the completed operation.</p>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001813438776__section193147219469"><h4 class="sectiontitle">Dropping a View</h4><p id="EN-US_TOPIC_0000001813438776__p9390172385110">Right-click the selected view and select <strong id="EN-US_TOPIC_0000001813438776__b20360151425314">Drop View</strong>. The <strong id="EN-US_TOPIC_0000001813438776__b186795155411">Drop View</strong> dialog box is displayed. Click <strong id="EN-US_TOPIC_0000001813438776__b2040185544">Yes</strong> to delete the view.</p>
|
|
<p id="EN-US_TOPIC_0000001813438776__p11837453516">Right-click the selected view and select <strong id="EN-US_TOPIC_0000001813438776__b11298544145515">Drop View 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>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |