首页 » ORACLE 9i-23ai » have recyclebin objects tablespace can be drop?

have recyclebin objects tablespace can be drop?

开启了recycle功能,删除的表会放到recyclebin中除sys,system,储存在对象原所在表空间,除了外键约束外,表的其它表附加对象还可以闪回,但如果一个表空间中的所有对象都已在recyclebin中,该表空间可以删除么?需要INCLUDING CONTENTS么?

SQL> create tablespace testdrop datafile '/oradata/orcl/testdrop.dbf' size 2m;
Tablespace created.

SQL> create table anbob.testdr (id int) tablespace testdrop;
Table created.

SQL> insert into anbob.testdr values(1);
1 row created.

SQL> commit;
Commit complete.
SQL> select table_name,tablespace_name,owner from dba_tables where table_name='TESTDR';

TABLE_NAME                     TABLESPACE_NAME                OWNER
------------------------------ ------------------------------ ------------------------------
TESTDR                         TESTDROP                       ANBOB

SQL> drop table anbob.testdr;
Table dropped.

SQL> select owner,object_name,original_name from dba_recyclebin;

OWNER                          OBJECT_NAME                    ORIGINAL_NAME
------------------------------ ------------------------------ --------------------------------
ANBOB                          BIN$rEMy9J9X1FvgQAB/AQAMUQ==$0 TESTDR

SQL> drop tablespace testdrop;

Tablespace dropped.

SQL> select owner,object_name,original_name from dba_recyclebin;

可以看到毫无提示的把表空间删除,而且回收站的东西也跟随而去!

打赏

目前这篇文章有4条评论(Rss)评论关闭。

  1. Brinda Broccolo | #1
    2011-12-21 at 05:24

    Great artical, I unfortunately had some problems printing this artcle out, The print formating looks a little screwed over, something you might want to look into.

  2. be927534f拉篮 | #2
    2011-09-07 at 13:27

    be927534f版主,你这个站是我很喜欢的几个站之一,这几天一直比较忙,没有过来看看,今天来看一下,发现不少新东西,忍不住写几句,真是好样的,博主,我喜欢你!!!

    • Bert | #3
      2011-11-12 at 03:37

      Tip top stuff. I’ll eecxpt more now.

  3. 宁波货代 | #4
    2011-09-07 at 11:59

    作为一个经常更新的版主,已经很不容易了,收藏一下,谢谢版主。