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

     
  • 相关阅读:
    递归练习题1
    爬虫模块之Beautiful Soup4
    python中的简易表格prettytable
    ubuntu中安装和使用quant-lib
    一个金融软件的基础功能分布
    ONLY_FULL_GROUP_BY 牛皮癣怎么治
    pandas
    pandas行筛选/列筛选(条件筛选/范围筛选)/计算
    conda 的 proxy设置
    openpyxl 安装失败的处理 (缺少 et_xmlfile )
  • 原文地址:https://www.cnblogs.com/ywx-vashon/p/5227120.html
Copyright © 2011-2022 走看看