错误地删除了一些 Oracle DBF 文件 - 如何告诉 Oracle XE 忘记它们?
因此,我不小心删除了一些 DBF 文件(仅特定于我的表空间的文件),幸运的是,我正要开始加载数据,所以没有丢失任何内容,只是现在无法重新创建表空间。
如果我运行:
select name from v$datafile;
结果包括我删除的 DBF 文件。
我尝试运行在互联网上找到的命令,删除 Oracle 认为相关的 DBF 文件:
alter database datafile '<A_DBF_file_that_no_longer_exists>' offline drop;
结果是:
alter database datafile succeeded
但是,当我运行 select 语句时,仍然返回删除的数据文件。 当我尝试创建新表空间时,出现错误:
SQL Error: ORA-01543: tablespace 'my_tablespace_name' already exists
01543. 00000 - "tablespace '%s' already exists"
*Cause: Tried to create a tablespace which already exists
*Action: Use a different name for the new tablespace
So I accidentally deleted some DBF files (only ones specific to my tablespaces), fortunately I was only just about to start loading data in so have lost nothing, except now can't re-create the tablespaces.
If I run:
select name from v$datafile;
The results include the DBF files that I deleted.
I attempted to run a command I found on the internet, to delete the DBF files that Oracle thinks are relevant:
alter database datafile '<A_DBF_file_that_no_longer_exists>' offline drop;
And the result is:
alter database datafile succeeded
However the datafile deleted is still returned when I run the select statement.
When I try to just create new tablespaces, I get the error:
SQL Error: ORA-01543: tablespace 'my_tablespace_name' already exists
01543. 00000 - "tablespace '%s' already exists"
*Cause: Tried to create a tablespace which already exists
*Action: Use a different name for the new tablespace
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也删除受影响的表空间。删除数据文件不会自动删除表空间。
Drop the affected tablespace, too. Droping the datafile will not automagically drop the tablespace.
尝试
如何从表空间中删除数据文件可能会很有趣欲了解更多信息:
Try
How to drop a datafile from a tablespace could be interesting for more information: