doc-exports/docs/dws/tool/DWS_DS_133.html
Lu, Huayi 4194b50d78 DWS TOOL 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2022-12-14 20:46:26 +00:00

95 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0000001098833176"></a><a name="EN-US_TOPIC_0000001098833176"></a>
<h1 class="topictitle1">Batch Dropping Objects</h1>
<div id="body1584526252530"><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p17271183741114">The batch drop operation allows you to drop multiple objects. This operation also applies to searched objects.</p>
<div class="note" id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_note198171052151211"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_ul154301813183"><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li2096120514244">Batch drop is allowed only within a database.</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li23851624182511">An error is reported on batch dropping system objects, which cannot be dropped.</li></ul>
</div></div>
<p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p612144082011">Perform the following steps to batch drop objects:</p>
<ol id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_ol1560025810134"><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li44889493146"><span>Press <strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b20969441068">Ctrl+left-click</strong> (select objects one by one) or <strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b1159525317618">Shift+left-click</strong> (select objects in a bunch) to select the objects to be dropped.</span></li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li10771338141920"><span>Right-click and select <strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b1368394115214">Drop Objects</strong>.</span><p><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p174851127132219">The <strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b122091941152916">Drop Objects</strong> tab displays the list of objects to be dropped.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_table164293493242" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row104291449102414"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.2.2.1.4.1.1"><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1092857172412"><strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b1921657182417">Column Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.2.2.1.4.1.2"><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1842920492245"><strong id="EN-US_TOPIC_0000001098833176__b141627342695823">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.2.2.1.4.1.3"><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1429549112410"><strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b13745442512">Example</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row1842984915248"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p3429149172411">Type</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1942920490245">Displays information about the object type.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.3 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p5429134922412">Table, view</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row1642910498241"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p13429174982412">Name</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p154292491245">Displays the object name.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.3 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p74295492247">public.bs_operation_201804</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row16429449152418"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p84299491244">Query</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p0429144919248">Displays the query that will be executed to drop objects.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.3 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1642919491246">DROP TABLE IF EXISTS public.a123</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row8429949202414"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p4429124952413">Status</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p14249184815316">Displays the status of the drop operation.</p>
<ul id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_ul122502486312"><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li10251134803114"><span><img id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_image872814995119" src="figure/en-us_image_0000001145513345.jpg"></span> To start: The drop operation has not been started.</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li112527484313"><span><img id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_image96905192527" src="figure/en-us_image_0000001145513343.jpg"></span> In progress: The object is being dropped.</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li825474819313"><span><img id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_image1354171115311" src="figure/en-us_image_0000001145913303.jpg"></span> Completed: The drop operation has been completed.</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li0256104818319"><span><img id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_image17551152913531" src="figure/en-us_image_0000001098833340.jpg"></span> Error: The object has not been dropped due to an error.</li></ul>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.3 "><ul id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_ul193112546314"><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li493195493114">To start</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li1493255415311">In progress</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li129331454123113">Completed</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li29351054153111">Error</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row1926115913316"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1926215916314">Error Message</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p72621197312">Displays the failure cause of a drop operation.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.2.2.1.4.1.3 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p32625943116">The table <strong id="EN-US_TOPIC_0000001098833176__b063344625514">abc</strong> does not exist. Skip it.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li106001588136"><span>Select the required parameters.</span><p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_table96382034123718" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row5639143423714"><th align="left" class="cellrowborder" valign="top" width="32%" id="mcps1.3.4.3.2.1.1.3.1.1"><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1163953418373"><strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b17757145392616">Option</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.4.3.2.1.1.3.1.2"><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1363915343374"><strong id="EN-US_TOPIC_0000001098833176__b29352536795823">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row063963415375"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.4.3.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1063916341376">Cascade</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p36391734103714">The cascade drop operation is performed to drop dependent objects and attributes. The dropped dependent objects will be removed from <strong id="EN-US_TOPIC_0000001098833176__b131784182820">Object Browser</strong> only after the refresh operation is performed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row463973453714"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.4.3.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p10639113414376">Atomic</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1980618945418">The atomic drop operation is performed to drop all objects. If the operation fails, no objects will be dropped.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_row11639203413719"><td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.4.3.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p663910347376">No selection</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p763914342373">If neither <strong id="EN-US_TOPIC_0000001098833176__b1942282919334">Cascade</strong> nor <strong id="EN-US_TOPIC_0000001098833176__b166031545173311">Atomic</strong> is selected, no dependent objects are dropped.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li517210263372"><span>Click <strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b133343719129">Start</strong>.</span><p><p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p8174226133711"><strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b6767184618253">Runs</strong>: displays the number of objects that are dropped from the object list</p>
<p id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1717617269371"><strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b63312509253">Errors</strong>: displays the number of objects that are not dropped due to errors</p>
</p></li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li1019450123811"><span>Click <strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b2758356151920">Stop</strong> or close the <strong id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_b5891170112012">Drop Objects</strong> dialog box to stop the drop operation.</span><p><div class="p" id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_p1365455224911">For details about copy, advanced copy, show/hide search bar, sort, and column reorder options, see <a href="DWS_DS_128.html#EN-US_TOPIC_0000001145833051__en-us_topic_0185264856_section16147111413113">Executing SQL Queries</a>.<div class="note" id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_note61002515369"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_ul1380619483512"><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li7453191871116">Select part of a cell and press <strong id="EN-US_TOPIC_0000001098833176__b109031114190">Ctrl+C</strong> or click <span><img id="EN-US_TOPIC_0000001098833176__image88101947111418" src="figure/en-us_image_0000001145913229.jpg"></span> to copy selected text in the cell.</li><li id="EN-US_TOPIC_0000001098833176__en-us_topic_0185263997_li7237154893016">When you select multiple objects in <strong id="EN-US_TOPIC_0000001098833176__b1343618434320">Object Browser</strong> to drop, a batch drop window is displayed and the object icons are enabled in the menu bar. If you disconnect the database, the icons will remain disabled even after reconnection. In this case, you need to reselect the objects to drop and the selected objects will be displayed in the new batch drop window.</li></ul>
</div></div>
</div>
</p></li></ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_131.html">Batch Operation</a></div>
</div>
</div>