ora-02429排查
来源:互联网 发布:淘宝上面卖中药的店 编辑:程序博客网 时间:2024/05/25 19:57
ora-02429:无法删除用于强制唯一/主键的索引
由于将主键约束建立到所要删除的表空间中,所有导致删除这个表空间报如上错误
解决方法:
ql>select segment_name,partition_name,tablespace_name from dba_extents where tablespace_name=upper('表空间名'); //查得主键约束
由
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 = '表空间名'); //生成删除主键约束的语句
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 = ' 2 3 4 5 6 7 aaa');
'ALTERTABLE'||OWNER||'.'||TABLE_NAME||'DROPCONSTRAINT'||CONSTRAINT_NAME||';'
--------------------------------------------------------------------------------
alter table aaa.bbb drop constraint PK_ST_BAIDU_REPORT ; //生成的删除语句
SQL> alter table aaa.bbb drop constraint PK_ST_BAIDU_REPORT ; //手动执行
Table altered.
然后删除表空间
SQL> drop tablespace SEMTOOLS;
drop tablespace SEMTOOLS
*
ERROR at line 1:
ORA-01549: tablespace not empty, use INCLUDING CONTENTS option
SQL> drop tablespace SEMTOOLS INCLUDING CONTENTS;
Tablespace dropped. //删除OK
END
本文属笔者原创,脚本引自“http://blog.csdn.net/yudehui/article/details/8098936”
作者:john
转载请注明出处
- ora-02429排查
- 用logminer排查ORA-00257 问题
- ORA-12012 ORA-08102故障排查和错误解决
- Oracle报ORA-01722错误的排查经验
- Oracle报ORA-01722错误的排查经验
- informatica 抛出ora-12592 :包错误 排查过程和解决办法
- ORACLE死锁(ORA-00060)故障排查的一般性手法
- 【IMPDP】使用工具IMPDP导入数据时ORA-39002、ORA-39070错误排查
- ORA-01855: AM/A.M. or PM/P.M. required问题排查与解析
- ORA-01855: AM/A.M. or PM/P.M. required问题排查与解析
- ORA-01855: AM/A.M. or PM/P.M. required问题排查与解析
- 一次ORA-28000: the account is locked用户锁定的问题排查
- ALERT日志中常见监听相关报错之一:ORA-609错误的排查
- ALERT日志中常见监听相关报错之二:ORA-3136错误的排查
- 安装grid运行root.sh报错ORA-15020 discovered duplicate ASM disk排查
- sqlplus登录报ORA-06502错误的问题排查和解决
- ORA-12154: TNS: 无法解析指定的连接标识符(分步排查法)
- 一次访问问题排查-涉及TNS-03505、ORA-12154、TNS-12560、动态注册、防火墙、tnsping跟踪等
- iOS與Web Service(Php)資料交換
- spring aop拦截action配置
- Mcrypt响应慢的一个原因
- vector运用
- Delphi获取系统特殊路径
- ora-02429排查
- 第一范式,第二范式,第三范式
- static成员变量,staitic成员函数以及 实现只能实例化3次的类
- JAVA项目和JAVAWEB项目的目录结构比较
- 面试遇到的问题
- HDU 4300 Clairewd’s message KMP
- 有些jpg图在IE浏览器中打不开
- RMAN 基础知识补充
- android 根据屏幕大小自行选择图片