#当我们在oracle里面drop表空间s时候总是报错
SQL> drop tablespace CFF including contents and datafiles;
drop tablespace CFF including contents and datafiles
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-38301: can not perform DDL/DML over objects in Recycle Bin
#根据提示我们先执行purge tablespace CFF,还是没有效果
SQL> purge tablespace CFF;
Tablespace purged.
SQL> drop tablespace CFF including contents and datafiles;
drop tablespace CFF including contents and datafiles
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-38301: can not perform DDL/DML over objects in Recycle Bin
#尝试用该schema的owner登陆sqlplus,然后执行purge recyclebin,然后再删除drop tablespace 现在出现新的报错信息
SQL> drop tablespace CFF including contents and datafiles;
drop tablespace CFF including contents and datafiles
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-02429: cannot drop index used for enforcement of unique/primary key
#最后查询 dba_segments显示该表空间内是否还有segments
SQL> select SEGMENT_NAME,SEGMENT_TYPE,owner from dba_segments where tablespace_n
ame='CFF';
SEGMENT_NAME
--------------------------------------------------------------------------------
SEGMENT_TYPE OWNER
------------------ ------------------------------
SYS_C007090
INDEX CFF
BIN$K6umfNuTTmmcE+ElzqjRig==$0
INDEX CFF
IND_BILLS_CREATETIME
INDEX CFF
SEGMENT_NAME
--------------------------------------------------------------------------------
SEGMENT_TYPE OWNER
------------------ ------------------------------
IND_BILLS_COMMENTS_BLNO
INDEX CFF
#找到SYS_C007090对应的表将外键取消,重新执行Drop
SQL> drop tablespace CFF including contents and datafiles;
Tablespace dropped.
SQL>