Home > Database > Mysql Tutorial > Drop user cascade failed ORA-00604 ORA-02429 处理一例

Drop user cascade failed ORA-00604 ORA-02429 处理一例

WBOY
Release: 2016-06-07 16:48:27
Original
1650 people have browsed it

我们知道drop user 带cascade会将所属的表空间和其他关联数据库对象一起删除,而这也说明正要被删除的对象和其他对象之间存在主外

在删除索引、表、或者表空间及用户等数据库对象或者用户的时候,有时候会遇到入下错误:

SQL> drop user Oracle cascade;
 
drop user oracle  cascade;
 
*
 
ERROR at line 1:
 
ORA-00604: error occurred at recursive SQL level 1
 
ORA-02429: cannot drop index used for enforcement of unique/primary key 
 
我们知道drop user 带cascade会将所属的表空间和其他关联数据库对象一起删除,而这也说明正要被删除的对象和其他对象之间存在主外键约束关联的问题,所以需要查询该对象存在哪些约束并删除之

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 onwner = 'ORACLE');
 
alter table w.table_name drop constraint PK_ID ;
 
alter table x.table_name drop constraint FK_UID ;
 
SQL> alter table w.table_name drop constraint pk_id;
 
table altered
 
SQL>alter table x.table_name drop constraint fk_uid;
 
table altered
 
SQL> drop user ORACLE cascade;
 
User dropped.
 
--用户删除成功 
 
查询出结果并删除即可drop user oralce cascade了,因为这个报错比较典型,网上还看到过很多种延伸出来的问题原因,,记录之。

推荐阅读:

ORA-01172、ORA-01151错误处理

ORA-00600 [2662]错误解决

ORA-01078 和 LRM-00109 报错解决方法

ORA-00471 处理方法笔记

ORA-00314,redolog 损坏,或丢失处理方法

ORA-00257 归档日志过大导致无法存储的解决办法

本文永久更新链接地址:

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template