ORA-23515 and ORA-02449 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
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;
'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
作者:Buro#79xxd
出处:http://www.cnblogs.com/buro79xxd/
文章版权归本人所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。