删除具有物化视图和丢失数据文件的表空间
我有一个部分恢复的数据库(用于测试目的),由于不需要它们的大小和性质,因此缺少几个表空间。因此,我需要删除这些表空间,但是其中一些表空间中包含物化视图,这让我陷入了困境 22。
> drop tablespace test including contents and datafiles;
drop tablespace test including contents and datafiles
*
ERROR at line 1:
ORA-23515: materialized views and/or their indices exist in the tablespace
因此,我们需要首先删除表空间。
drop materialized view test.test_table_mv;
drop materialized view test.test_table_mv
*
ERROR at line 1:
ORA-00376: file 172 cannot be read at this time
ORA-01111: name for data file 172 is unknown - rename to correct file
ORA-01110: data file 172: '/u01/software/9.2.0.5.0/dbs/MISSING00172'
知道如何解决这个问题,而不实际恢复数据文件,磁盘空间和时间不允许这样做吗?
I have a partial recovered database ( for testing purposes ), with a couple of tablespaces missing due to their size and nature are not needed. So, I need to drop these tablespaces however some of them have materialized views in them, which puts me in a bit of a catch 22.
> drop tablespace test including contents and datafiles;
drop tablespace test including contents and datafiles
*
ERROR at line 1:
ORA-23515: materialized views and/or their indices exist in the tablespace
So, we need to drop the tablespace first.
drop materialized view test.test_table_mv;
drop materialized view test.test_table_mv
*
ERROR at line 1:
ORA-00376: file 172 cannot be read at this time
ORA-01111: name for data file 172 is unknown - rename to correct file
ORA-01110: data file 172: '/u01/software/9.2.0.5.0/dbs/MISSING00172'
Any idea how to get around this, without actually recovering the datafiles, diskspace and time will not permit that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现的一个解决方案是删除拥有 mview 的用户,这可行,但有点暴力。
one solution i have found is to drop the user owning the mview, this works but is a bit brute force.