ITPub博客

首页 > 数据库 > Oracle > Rman -按时间进行不完全恢复-restore archivelog

Rman -按时间进行不完全恢复-restore archivelog

原创 Oracle 作者:kennyblues 时间:2008-06-01 18:37:04 0 删除 编辑

在日常恢复中,我们会遇到这样一种情况,当我们在脚本用set until time "to_date('20080520 12:00:00','YYYYMMDD hh24:mi:ss')";设置了restore controlfile,restore datafiles之后.我们怎么找到我们想恢复的archive log?

[@more@]

可以这样:

1.在rman中,列出某个时间段所涉及到的archivelog:

rman> list backup of archivelog time between "to_date('2008-05-20 00:00:00','yyyy-mm-dd hh24:mi:ss
')" and "to_date('2008-05-20 12:00:00','yyyy-mm-dd hh24:mi:ss')";

2.根据内容,在恢复脚本中列出所需要的archive logs:

rman>restore archivelog from logseq 22976 until logseq 22987 ;

这样,在恢复时就可以:

sql>alter session set nls-date_format='yyyy-mm-dd hh24:mis:ss';

sql>recover database until time 'your time' using backup controfile;

之后就能恢复到你想要的时间点了.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3345/viewspace-1004902/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-03-07

  • 博文量
    73
  • 访问量
    482189