Oracle ORA-14404和ORA-14407错误的解决方法
2013-03-09 20:53
351 查看
1、ORA-14404错误的解决方法
ORA-14404错误信息、原因和解决措施如下表:ORA-14404 | partitioned table contains partitions in a different tablespace |
Cause | An attempt was made to drop a tablespace which contains tables whose partitions are not completely contained in this tablespace |
Action | find tables with partitions which span the tablespace being dropped and some other tablespace(s). Drop these tables or move partitions to a different tablespace |
例1:当要删除表空间mytemp1时出现错误
SQL> drop tablespace mytemp1 including contents;
drop tablespace mytemp1 including contents
*
第 1行出现错误:
ORA-14404: 分区表包含不同表空间中的分区
意思是分区表的数据分布在不同表空间中的分区,解决方法是,找到这些跨越(span)不同表空间的表,将这些表删除或是将这些表备份到不同的表空间。
找到在不同的表空间的分区表语句是:
SQL> edit
已写入 file afiedt.buf
1 SELECT x.table_name,x.partition_name,x.tablespace_name表空间1, y.tablespace_name表空间2
2 FROM dba_tab_partitions x, dba_tab_partitionsy
3* WHEREx.tablespace_name ='MYTEMP1' AND y.tablespace_name <> 'MYTEMP1' AND x.table_name=y.table_name
SQL> /
执行结果如下:
即找到名称为PART_BOOK的分区表的数据在表空间mytemp1、mytemp2和mytemp3上。详细的信息可使用下面的语句查询:
SQL> SELECT table_name,partition_name,tablespace_name FROMdba_tab_partitions WHERE tablespace_name in ('MYTEMP1', 'MYTEMP2', 'MYTEMP3');
结果为:
要删除表空间mytemp1,将表PART_BOOK删除或将该表备份到其他的表空间。
SQL>DROP TABLE part_book;
表已删除。
SQL> DROP TABLESPAC mytemp1;
表空间已删除。
2、ORA-14407错误的解决方法
ORA-14407错误的信息、原因和解决措施如下:ORA-14407 | partitioned table contains subpartitions in a different tablespace |
Cause | An attempt was made to drop a tablespace which contains tables whose subpartitions are not completely contained in this tablespace |
Action | find tables with subpartitions which span the tablespace being dropped and some other tablespace(s). Drop these tables or move subpartitions to a different tablespace |
例2. 当要删除表空间mytemp1时出现错误:
SQL> drop tablespace mytemp1 including contents;
drop tablespace mytemp1 including contents
*
第 1行出现错误:
ORA-14407: 分区的表包含在不同表空间中的子分区
出现该错误是因为当删除表空间时,同一分区(这里说的区实际上的段)的子分区分布在不同的表空间中。使用下面的语句可查询出
SELECT segments, segment_type,segment_subtype, tablespace_name
FROM dba_segments
WHERE segments in (SELECT segment_name
FROM dba_segments
WHERE tablespace_name='MYTEMP1')
子查询时查询出表空间MYTEMP1对应的哪些段。结果为:
从上面可以看出,分区表PART_BOOK4在不同的表空间MYTEMP1和MYTEMP2中,要删除表空间MYTEMP1,需要将表PART_BOOK4删除。
SQL> DROP TABLE system.part_book4;
表已删除。
SQL> DROP TABLESPACE mytemp1;
表空间已删除。
相关文章推荐
- ORACLE 存储过程的创建以及ORA-06502:PL/SQL:数字或值错误的解决方法
- Oracle错误 ora-12514 解决方法
- Oracle错误 ora-12514 解决方法
- Oracle 11.2.0.3 ORA-12012 ORA-29280 ORA-06512 错误 解决方法
- Oracle 11g 错误:ORA-28002: the password will expire within 7 days 解决方法
- navicat连接oracle数据库报ORA-28547: connection to server failed, probable Oracle Net admin error错误的解决方法
- Oracle错误 ora-12514 解决方法
- oracle奇怪的ora-00955错误的解决方法
- oracle删除表空间引发错误的解决方法 ORA-01122,ORA-01110,ORA-01203
- intra-mart中oracle ORA-02289: 順序が存在しません错误的解决的方法
- Oracle 11.2.0.3 ORA-12012 ORA-29280 ORA-06512 错误 解决方法
- ORACLE错误1033出现和ORA-00600错误解决的方法
- oracle登录错误:ORA-28000: the account is locked 解决方法
- 关于在Windows中安装Oracle碰到ORA-12638错误的解决方法
- Oracle错误 ora-12514 解决方法
- 将Ofbiz的数据库改为Oracle,运行时出现 ORA-01843: 无效的月份 错误 的原因及解决方法
- oracle登录错误:ORA-28000: the account is locked 解决方法
- Oracle ORA-12154: TNS:could not resolve service name错误的解决方法
- Oracle建立实例时报【ORA-12638: 身份证明检索失败解决方法】错误的解决方法
- Oracle 11.2.0.3 ORA-12012 ORA-29280 ORA-06512 错误 解决方法