restore archivelog的各种用法(四)
4.恢复7天内的归档日志
RMAN> restore archivelog from time 'sysdate-7'; Starting restore at 02-JUN-08 using channel ORA_DISK_1 channel ORA_DISK_1: starting archive log restore to default destination channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=1 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=2 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=3 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=4 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=5 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=6 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=7 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=8 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=9 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=10 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=11 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=12 channel ORA_DISK_1: restored backup piece 1 piece handle=D:\BACKUP\2OJHUA5Q_1_1 tag=TAG20080602T162426 params=NULL channel ORA_DISK_1: restore complete channel ORA_DISK_1: starting archive log restore to default destination channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=13 channel ORA_DISK_1: restored backup piece 1 piece handle=D:\BACKUP\2QJHUA76_1_1 tag=TAG20080602T162510 params=NULL channel ORA_DISK_1: restore complete Finished restore at 02-JUN-08 RMAN>
5. sequence between 写法
RMAN> restore archivelog sequence between 1 and 3; Starting restore at 02-JUN-08 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=10 devtype=DISK channel ORA_DISK_1: starting archive log restore to default destination channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=1 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=2 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=3 channel ORA_DISK_1: restored backup piece 1 piece handle=D:\BACKUP\2OJHUA5Q_1_1 tag=TAG20080602T162426 params=NULL channel ORA_DISK_1: restore complete Finished restore at 02-JUN-08
6.恢复到哪个日志文件为止
RMAN> restore archivelog until logseq 3; Starting restore at 02-JUN-08 using channel ORA_DISK_1 channel ORA_DISK_1: starting archive log restore to default destination channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=1 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=2 channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=3 channel ORA_DISK_1: restored backup piece 1 piece handle=D:\BACKUP\2OJHUA5Q_1_1 tag=TAG20080602T162426 params=NULL channel ORA_DISK_1: restore complete Finished restore at 02-JUN-08
6.从第五个日志开始恢复
RMAN> restore archivelog low logseq 5;
Starting restore at 02-JUN-08
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=5
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=6
channel ORA_DISK_