免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2735 | 回复: 4
打印 上一主题 下一主题

请问:如何彻底删除数据文件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-12-13 18:09 |只看该作者 |倒序浏览
alter database datafile '/oracle/oracle/oradata/ora920/system02.dbf'  OFFLINE drop;

删除增加错误的数据文件后,重启数据库后,用select FILE_NAME from dba_data_files;还是可以找到相应的数据文件,
select file#,name,status from v$datafile;看到数据文件的状态是RECOVER,请问怎样可以彻底的将datafile '/oracle/oracle/oradata/ora920/system02.dbf'在数据库中删除呢?

论坛徽章:
0
2 [报告]
发表于 2004-12-13 18:20 |只看该作者

请问:如何彻底删除数据文件

alter database datafile '...'
offline drop;

论坛徽章:
0
3 [报告]
发表于 2004-12-15 12:39 |只看该作者

请问:如何彻底删除数据文件

是这样的,但执行alter database datafile filename offline drop后应在v$datafile内状态为offline,这也许是Oracle公司应解决的问题。

Once you make a datafile part of a tablespace, the datafile CANNOT be removed,  although we can use some workarounds.

If you have more than one datafile in the tablespace and you wish to keep the  objects that reside in the other datafile(s) which are part of this tablespace, then you must export all the objects  inside the affected tablespace.



广东励康  提供Oracle技术支持服务

论坛徽章:
0
4 [报告]
发表于 2004-12-15 16:52 |只看该作者

请问:如何彻底删除数据文件

不允许的,oracle的数据在数据文件间分配,删除了一个数据文件后别的数据文件记录的内容也不完整了,如果要删一个数据文件的话和删了个表空间再重建差不多。

论坛徽章:
0
5 [报告]
发表于 2004-12-17 06:30 |只看该作者

请问:如何彻底删除数据文件

you should drop the entire tablespace instead of the individual datafiles.

drop tablespace xxx including contents and datafiles;
(warning: make sure know what you are doing)

"alter database datafile '/oracle/oracle/oradata/ora920/system02.dbf' OFFLINE drop;"
does not actually drop the datafile. it only marks it as offline.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP