故障六:删除126源服务器的GBOSV1的表空间和数据文件,发生ORA-00604,ORA-02429
解决:在126源服务器上执行以下命令
SQL> drop tablespace gbosv1 including contents;
drop tablespace gbosv1 including contents
第 1 行出现错误:
ORA-00604: 递归 SQL 级别 1 出现错误
ORA-02429: 无法删除用于强制唯一/主键的索引
--生成删除主键约束的脚本
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 = 'GBOSV1');
SQL> alter table GBOSV1.T_O_OPEN_DOOR_RECORD drop constraint PK_O_OPEN_DOOR_RECO
RD_COLS ;
表已更改。
SQL> drop tablespace gbosv1 including contents and datafiles;
表空间已删除。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/607244/viewspace-766064/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/607244/viewspace-766064/