怎麼purge 已經被drop 的對象

來源:互聯網
上載者:User

怎麼purge 已經被drop 的對象

怎麼purge 已經被drop 的對象

以被drop對象所在的user去登陸sqlplus

然後show recyclebin;

F:\Oracle\product\10.2.0\db_1\BIN>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Feb 19 09:04:17 2015

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

12:41:11 sys@FS> conn system/aaaaaa
Connected.
12:41:17 system@FS> show recyclebin;
ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
---------------- ------------------------------ ------------ -------------------

XXX              BIN$T7ZJRNkmQcGysyaMOwZS9Q==$0 TABLE        2015-02-19:12:38:44


12:41:22 system@FS> purge table "BIN$T7ZJRNkmQcGysyaMOwZS9Q==$0";

Table purged.

Elapsed: 00:00:00.51
12:45:38 system@FS> show recyclebin;
12:45:40 system@FS>

這是 僅僅purge 資源回收筒中的一個對象,其實,還有其他幾種purge的細粒度:

purge index idx_test_1;
PURGE TABLESPACE USERS;
PURGE TABLESPACE USERS USER SCOTT;
PURGE RECYCLEBIN;--->purge 資源回收筒中自己使用者下的對象,並不是purge 整個資源回收筒(並不是purge 資源回收筒中所有使用者下的對象)
PURGE DBA_RECYCLEBIN;--->purge 整個資源回收筒(purge 資源回收筒中所有使用者下的對象)

其實DBA_RECYCLEBIN 也是一個可以select的視圖,該視圖的TS_NAME是對象所在的資料表空間名字。TS_NAME列在drop datafile 報ORA-03262: the file is non-empty 時,可以起到診斷作用。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.