1、报错:删除表空间时出现错误
ORA-00604: 递归SQL 级别 1 出现错误
ORA-02429: 无法删除用于强制唯一/主键的索引
2、解决:
(1)查询存在哪些约束
select 'alter table '||owner||'.'||table_name||' drop constraint '||constraint_name||' ;'
from dba_constraints
where constraint_type in ('U', 'P')
and (index_owner, index_name) in
(select owner, segment_name
from dba_segments
where tablespace_name = 'HOEGH');
(2)将表中的内容复制到sql窗口,删除约束
(3)删完所有约束后,再进行表空间的删除
drop tablespace tablespace_name including contents and datafiles;