• oracle 删除表空间错误 提示:ora02429:无法删除用于强制唯一/


    sql>drop tablespace zfxfzb;
    ora-01549:表空间非空,请使用INCLUDING CONTENTS 选项
    sql>drop tablespace zfxfzb INCLUDING CONTENTS and datafiles;
    ora-00604:递归sql层1出现错误。
    ora-02429:无法删除用于强制唯一/主键的索引。
    sql>drop tablespace zfxfzb including contents cascade constraints;
    ora-00604:递归sql层1出现错误。
    ora-02429:无法删除用于强制唯一/主键的索引。
    sql>select segment_name,partition_name,tablespace_name from   dba_extents    where tablespace_name=upper('zfxfzb');

    显示出2个表的主键的表空间是:'zfxfzb'.
    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 = upper('zfxfzb'));

    显示结果如下:
    alter table TEST.SYS_CODE drop constraint PK_CODEID ;
    alter table TEST.KS_WPYP_PWPLGX drop constraint PK_KS_WPYP_PWPLGX ;
    执行以上2条显示的结果
    sql>alter table TEST.SYS_CODE drop constraint PK_CODEID ;
    表已经更改
    sql>alter table TEST.KS_WPYP_PWPLGX drop constraint PK_KS_WPYP_PWPLGX ;
    表已经更改
    sql>drop tablespace zfxfzb;


    表空间已经丢弃。
    记得修改上面2个被修改过的表。

  • 相关阅读:
    转载:怎样用通俗的语言解释REST,以及RESTful?
    WiresShark 图解教程1
    派力奥 1.3 发动机
    EtherChannel Cisco 端口聚合详解
    Linux 排除问题的前5分钟
    Linux 定时任务crontab
    Linux SCP命令复制传输文件的用法
    Linux 挂载aliyun数据盘
    BCDedit 研究
    Bcdedit命令使用详解使用方法
  • 原文地址:https://www.cnblogs.com/emanlee/p/2213650.html
Copyright © 2020-2023  润新知