ora-00604 ora-02429

233 篇文章 6 订阅

问题

删除表空间报错

oerr ora 00604
00604, 00000, "error occurred at recursive SQL level %s"
// *Cause:  An error occurred while processing a recursive SQL statement
//         (a statement applying to internal dictionary tables).
// *Action: If the situation described in the next error on the stack
//         can be corrected, do so; otherwise contact Oracle Support.

oerr ora 02429
02429, 00000, "cannot drop index used for enforcement of unique/primary key"
// *Cause: user attempted to drop an index that is being used as the
//         enforcement mechanism for unique or primary key.
// *Action: drop the constraint instead of the index.

解决思路

select * from (select owner,segment_name,segment_type,sum(bytes)/1024/1024/1024 GB  
        from dba_segments 
        where tablespace_name='表空间名称大写'
        group by owner,segment_name,segment_type order by 4 desc ) 
where rownum <10;
oerr ora 01418
01418, 00000, "specified index does not exist"
// *Cause:
// *Action:

大写也不好使。。。

set long 9999
select dbms_metadata.get_ddl('INDEX','索引名称','用户') from dual;

删除约束

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 = '表空间名称');
oerr ora 02443
02443, 00000, "Cannot drop constraint  - nonexistent constraint"
// *Cause: alter table drop constraint <constraint_name>
// *Action: make sure you supply correct constraint name.

注意要大写

再删除索引就OK了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值