Chinaunix首页 | 论坛 | 博客
  • 博客访问: 512213
  • 博文数量: 63
  • 博客积分: 1194
  • 博客等级: 中士
  • 技术积分: 761
  • 用 户 组: 普通用户
  • 注册时间: 2011-02-24 12:44
个人简介

得之坦然,失之淡然,争其必然,顺其自然!

文章分类

全部博文(63)

文章存档

2014年(2)

2013年(22)

2012年(39)

分类:

2013-03-08 17:00:31

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

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

alter database open resetlogs的open resetslogs有什么作用?

open resetlogs应该是将日志重新归位,使数据库的scn,检查点等保持一致
你可以用archive log list看一下,这时日志序列应该为1
相当于把所有的联机日志重新“格式化”。这是会丢失数据的。

注:
resetlog 选项在不完全恢复时用
noresetlog 在完全恢复的时候用


摘自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.

阅读(7105) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~