删除表空间时出现错误

问题:

ORA-00604: 递归SQL 级别 1 出现错误

ORA-02429: 无法删除用于强制唯一/主键的索引

 

解决:

第一步:查询存在哪些约束

SQL> 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');

 

第二步:将表中的内容复制到sql窗口,删除约束

 Oracle—删除表空间出现约束的解决办法

第三步:删完所有约束后,再进行表空间的删除

Drop tablespace tablespace_name including contents and datafiles;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-02-26
  • 2021-11-19
  • 2022-12-23
猜你喜欢
  • 2022-02-28
  • 2021-07-15
  • 2021-07-01
  • 2022-03-10
  • 2022-01-06
  • 2022-02-05
相关资源
相似解决方案