第 1 行出现错误:
ORA-23515: 实体化视图和/或它们的索引存在于表空间中
1、查这个表空间有哪些mview的语句:
select table_name, tablespace_name from dba_tables
where tablespace_name='EXAMPLE'
and table_name in (select
mview_name from dba_mviews);
2、删除mv
drop materialized view scott.mv_test_INFO PRESERVE TABLE;
3、删除表空间
drop tablespace example including contents and datafiles cascade constraints;
4、如不能删除,查找索引
select OWNER,SEGMENT_NAME,SEGMENT_TYPE
from dba_segments
where tablespace_name = 'EXAMPLE_DATA'
and segment_name in
(select index_name
from dba_indexes
where table_name in (select mview_name from dba_mviews));
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/77164/viewspace-739655/
,如需转载,请注明出处,否则将追究法律责任。