oracle完全恢复和不完全恢复,oracle的完全恢复与不完全恢复的区别

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

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

并在恢复后使用resestlogs选项来打开数据库,如果使用了backup的controlfile

或者重建的controlfile 也一定得用open resetlogsalter 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值