删除具有物化视图和丢失数据文件的表空间

发布于 2024-11-10 10:19:43 字数 716 浏览 5 评论 0原文

我有一个部分恢复的数据库(用于测试目的),由于不需要它们的大小和性质,因此缺少几个表空间。因此,我需要删除这些表空间,但是其中一些表空间中包含物化视图,这让我陷入了困境 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枕头说它不想醒 2024-11-17 10:19:43

我发现的一个解决方案是删除拥有 mview 的用户,这可行,但有点暴力。

one solution i have found is to drop the user owning the mview, this works but is a bit brute force.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文