Oracle 数据库:我可以删除错误创建的数据文件吗?
我需要删除一个错误创建的数据文件,数据库是Oracle 10g R2。我可以执行以下操作吗?
alter tablespace abc drop datafile '/abc.dbf'
数据文件abc.dbf处于离线(需要恢复)状态且为0字节。既然已经下线了,我想是不能这样掉线的,那么你有什么建议呢?
I need to get rid off a data file which created mistakenly, the db is Oracle 10g R2. May I do the following?
alter tablespace abc drop datafile '/abc.dbf'
The data file abc.dbf is in offline (needs recovery) state and 0 byte. Since it is offlined, I think it can't be dropped this way, so what's your suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会尝试先将其恢复在线,然后再删除。
您将收到一个 ORA 错误,指出该文件需要恢复,请执行
以下操作:将其联机并删除它,然后
如果这对您不起作用,请执行以下任一操作:
注意:如果您要删除表空间,请不要忘记还指定删除其中的数据文件。
I would try to bring it back online first, then drop.
you'll get an ORA error saying that the file needs recovery, do that
bring it online and drop it then
If that doesn't work for you, do either of:
Note: if you go with dropping the tablespace, don't forget to also specify to drop the datafiles with it.