怎麼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 時,可以起到診斷作用。

相關文章

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.