zoukankan      html  css  js  c++  java
  • 删除表空间时,遇到了ORA-14404错误

     
    Oracle中删除表空间时,遇到了ORA-14404错误。
     
    错误信息如下:
    SQL> DROP TABLESPACE PART1 INCLUDING CONTENTS AND DATAFILES;
    DROP TABLESPACE PART1 INCLUDING CONTENTS AND DATAFILES
    ORA-14404: partitioned table contains partitions in a different tablespace
     
    同样查看官方文档的说明:
    Oracle Error: ORA-14404

    Error Description:
    Partitioned table contains partitions in a different tablespace

    Error 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.
     
    问题分析:
    ORA-14404错误说明有某个表不仅仅只在当前表空间,在其他表空间也存有数据。解决方法,Oracle的建议也比较清晰,要么删除这个表,要么把移动partitions到一个单独的表空间中。对于我来说,我删除此表即可。
     
    首先需要找到到底是哪张表跨越了不同表空间:
    SQL> SELECT x.table_name,x.partition_name,x.tablespace_name 表空间1, y.tablespace_name 表空间2
      2  FROM dba_tab_partitions x, dba_tab_partitions y
      3  WHERE x.tablespace_name ='PART1' AND y.tablespace_name <> 'PART1' AND x.table_name=y.table_name;
    TABLE_NAME                     PARTITION_NAME                 表空间1                        表空间2
    ------------------------------ ------------------------------ ------------------------------ ------------------------------
    RANGE_PART                     YR0                            PART1                          PART2
    RANGE_PART                     YR0                            PART1                          PART3
    RANGE_PART                     YR0                            PART1                          PART4

    即找到名称为RANGE_PART的分区表的数据在表空间PART1、PART2和PART3上,接下来删除此表即可。
    SQL> drop table RANGE_PART;
    Table dropped

     
  • 相关阅读:
    第四课:数字系统抽象
    第三课:叠加法和戴维南法
    第二课:基本电路法
    电路和电子学第一课:集总电路抽象
    第三十六课:告别演出
    第三十五课:多普勒效应和宇宙大爆炸
    第三十四课:光栅和分辨率
    第三十三课:干涉
    第三十二课:复习课
    第三十一集:彩虹
  • 原文地址:https://www.cnblogs.com/ywx-vashon/p/5227120.html
Copyright © 2011-2022 走看看