• 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

  • 相关阅读:
    虚拟主机的陷阱
    http://www.xmenglish.com/(外贸知识网站)
    Highlight Table Row
    让你从电脑维修新手到高手
    Flash 视频教程
    ASP Comparison Operators Logical Operators
    Linux 虚拟机 NAT方式上网设置
    vim技巧
    25 条 SSH 命令和技巧
    linux下添加路由的方法
  • 原文地址:https://www.cnblogs.com/buro79xxd/p/1682589.html
Copyright © 2020-2023  润新知