暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

How do I recover from ... a situation where there is no datafile backup

2011-01-01
644

The Oracle (tm) Users' Co-Operative FAQ

How to Recover in a situation where there is no datafile backup


Author's name: Allan W. Tham

Author's Email: allanwtham@hotmail.com

Date written: Feb 26 2002

Oracle version(s): 8.1.7.0.0

I accidentally delete a datafile and I didn't do a backup on it. How can I recover it?


Initially if the database is up, if you try to do a shutdown immediate, you will get ora-01116, ora-01110 and ora-27041. If initially you are down,
trying to start it up will result in Ora-01157 and Ora-01110


1. Do a shutdown abort
2. Startup mount
3. Get the Path and Size of the missing datafile -
    select df.file#, df.status, df.enabled, df.create_bytes, df.name
    from v$recover_file rf, v$datafile df
    where rf.file#=df.file# and rf.error = "FILE NOT FILE"
    (note the path and size of the missing file)
4. Create the datafile - alter database create datafile '/path/filename.dbf' as '/path/filename.dbf' size xxx reuse
    (Make sure that the path and size are the same as step 4)
5. If the file is offline, then bring in online - alter database datafile '/path/filename.dbf' online;
6. Recover the database - recover database
7. Open the database - alter database open


Further reading: Metalink Note:1060605.6



最后修改时间:2020-04-16 15:13:21
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论