本机的数据库是32位的10.2.0.1.0,表空间为TEST_TB存在若干个表数据。刚开始时用dba角色的system用户,直接执行
drop tablespace test_tb including contents and datafiles;
提示:
ORA-00604:递归SQL级别1出现错误
ORA-38301:无法对回收站中的对象执行DDL/DML
原因:dba_segments中存在该表空间test_tb的数据,可通过dba用户执行查询:
select segment_name,segment_type,owner from dba_segments where tablespace_name='TEST_TB';
处理方法:
1.用该表空间所对应用户登录
2.执行purge recyclebyin;
3.重新执行 drop tablespace test_tb incluing contents and datafiles;
执行完毕后,dbf文件不存在,空间也腾出来了。