您的位置:首页 > 数据库 > Oracle

oracle中的完全恢复和不完全恢复有什么区别?如何确定可以采用哪种恢复方式?

2008-10-19 22:55 411 查看
完全恢复:利用重做日志或增量备份将数据块恢复到最接近当前时间的时间点。之所以叫做完整恢复是由于Oracle应用了归档日志和联机重做日志中所有的修改

不完全恢复:利用备份产生一个非当前版本的数据库。换句话说,恢复过程中不会应用备份产生后生成的所有的重做日志。通常在下列情况下生成整个数据库的不完整恢复
介质失败损坏了几个或全部的联机重做日志文件;
用户操作造成的数据丢失,比如,用户误删除了一张表;
由于个别归档日志文件的丢失无法进行完整的恢复;
丢失了当前的控制文件,必须使用备份的控制文件打开数据库。
为了执行不完整介质恢复,必须使用恢复时间点以前的备份来还原数据文件,并在恢复完成后使用RESETLOG选项打开数据库。

alter database open resetlogs的open resetslogs有什么作用
RESETLOG选项在不完全恢复时用
noresetlog在完全恢复的时候用
如果用了backup 的controlfile 或者重建的control file就一定要用 open resetlogs

open resetlogs应该是将日志重新归位,使数据库的scn,检查点等保持一致
你可以用archive log list看一下,这时日志序列应该为1


oracle官方的解释
1、Archives the current online redo logs (if they are accessible) and then erases the contents of the online redo logs and resets the log sequence number to 1.
For example, if the current online redo logs are sequence 1000 and 1001 when you open RESETLOGS, then the database archives logs 1000 and 1001 and then resets the online logs to sequence 1 and 2.

2、Creates the online redo log files if they do not currently exist.

3、Reinitializes the control file metadata about online redo logs and redo threads.

4、Updates all current datafiles and online redo logs and all subsequent archived redo logs with a new RESETLOGS SCN and time stamp.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐