在日常恢复中,我们会遇到这样一种情况,当我们在脚本用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;
之后就能恢复到你想要的时间点了.