zoukankan      html  css  js  c++  java
  • ORA23515 and ORA02449 on Drop Tablespace

    xxd@ETMCDB> alter tablespace ETMCDB offline;
    Tablespace altered

    xxd@ETMCDB> drop tablespace ETMCDB including contents and datafiles;
    drop tablespace ETMCDB including contents
    ORA-23515: materialized views and/or their indices exist in the tablespace

    xxd@ETMCDB> select 'drop materialized view '||owner||'.'||name||' PRESERVE TABLE;'
                  from dba_registered_snapshots where name in  
                       (select table_name from dba_tables where tablespace_name ='ETMCDB');
    'DROPMATERIALIZEDVIEW'||OWNER||'.'||NAME||'PRESERVETABLE;'
    --------------------------------------------------------------------------------
    drop materialized view XXD.MV PRESERVE TABLE;

    xxd@ETMCDB> drop materialized view XXD.MV PRESERVE TABLE;
    Materialized view dropped.

    xxd@ETMCDB> drop tablespace ETMCDB including contents and datafiles;
    ORA-02449: unique/primary keys in table referenced by foreign keys

    xxd@ETMCDB> drop tablespace ETMCDB including contents and datafiles CASCADE CONSTRAINTS;
    Tablespace dropped

  • 相关阅读:
    Java学习之路(三)--Thinking in Java
    Java学习之路(二)--Thinking in Java
    Java学习之路(一)--Thinking in Java
    ES6中y修饰符合u修饰符
    map数据结构
    Set数据结构
    不确定参数的处理
    函数参数的默认值
    class基础语法
    生成新数组的方法和在数组中查找
  • 原文地址:https://www.cnblogs.com/buro79xxd/p/1682589.html
Copyright © 2011-2022 走看看