请教:如何从备份中恢复归档日志?

[复制链接]
查看11 | 回复4 | 2006-11-3 01:02:53 | 显示全部楼层 |阅读模式
备份时执行如下语句:
RMAN> run{
2> allocate channel ch1 type disk;
3> allocate channel ch2 type disk;
4> allocate channel ch3 type disk;
5> backup full
6> format 'e:\rmanbak\full_%s_%p'
7> database include current controlfile;
8> sql 'alter system archive log current';
9> backup format 'e:\rmanbak\arch%u_%s_%p'
10> archivelog from time 'sysdate-1' delete input;
11> release channel ch1;
12> release channel ch2;
13> release channel ch3;
14> }
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch1
RMAN-08500: channel ch1: sid=31 devtype=DISK
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch2
RMAN-08500: channel ch2: sid=28 devtype=DISK
RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: ch3
RMAN-08500: channel ch3: sid=101 devtype=DISK
RMAN-03022: compiling command: backup
RMAN-03023: executing command: backup
RMAN-08008: channel ch1: starting full datafile backupset
RMAN-08502: set_count=7 set_stamp=607276872 creation_time=23-NOV-06
RMAN-08010: channel ch1: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00014 name=E:\DATABASE\MFGRAWDATATMP2.DBF
RMAN-08522: input datafile fno=00009 name=E:\DATABASE\MFGRAWDATA2.DBF
RMAN-08522: input datafile fno=00001 name=E:\DATABASE\SYSTEM01.DBF
RMAN-08011: including current controlfile in backupset
RMAN-08522: input datafile fno=00011 name=E:\DATABASE\MFGOPTDATA.DBF
RMAN-08008: channel ch2: starting full datafile backupset
RMAN-08502: set_count=8 set_stamp=607276874 creation_time=23-NOV-06
RMAN-08010: channel ch2: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00012 name=E:\DATABASE\MFGRAWDATAINDX1.DBF
RMAN-08522: input datafile fno=00004 name=E:\DATABASE\TEMP01.DBF
RMAN-08522: input datafile fno=00005 name=E:\DATABASE\INDX01.DBF
RMAN-08522: input datafile fno=00006 name=E:\DATABASE\OEMREP01.DBF
RMAN-08522: input datafile fno=00003 name=E:\DATABASE\USERS01.DBF
RMAN-08008: channel ch3: starting full datafile backupset
RMAN-08502: set_count=9 set_stamp=607276875 creation_time=23-NOV-06
RMAN-08010: channel ch3: specifying datafile(s) in backupset
RMAN-08522: input datafile fno=00013 name=E:\DATABASE\MFGRAWDATATMP1.DBF
RMAN-08522: input datafile fno=00008 name=E:\DATABASE\MFGRAWDATA1.DBF
RMAN-08522: input datafile fno=00002 name=E:\DATABASE\RBS01.DBF
RMAN-08522: input datafile fno=00007 name=E:\DATABASE\DR01.DBF
RMAN-08522: input datafile fno=00010 name=E:\DATABASE\MFGSPCDATA1.DBF
RMAN-08013: channel ch1: piece 1 created
RMAN-08503: piece handle=E:\RMANBAK\FULL_7_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:11:56
RMAN-08013: channel ch3: piece 1 created
RMAN-08503: piece handle=E:\RMANBAK\FULL_9_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:12:39
RMAN-08013: channel ch2: piece 1 created
RMAN-08503: piece handle=E:\RMANBAK\FULL_8_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:13:55
RMAN-03023: executing command: partial resync
RMAN-08003: starting partial resync of recovery catalog
RMAN-08005: partial resync complete
RMAN-03022: compiling command: sql
RMAN-06162: sql statement: alter system archive log current
RMAN-03023: executing command: sql
RMAN-03022: compiling command: backup
RMAN-03025: performing implicit partial resync of recovery catalog
RMAN-03023: executing command: partial resync
RMAN-08003: starting partial resync of recovery catalog
RMAN-08005: partial resync complete
RMAN-03023: executing command: backup
RMAN-08009: channel ch1: starting archivelog backupset
RMAN-08502: set_count=10 set_stamp=607277714 creation_time=23-NOV-06
RMAN-08014: channel ch1: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=7556 recid=7412 stamp=607193737
RMAN-08504: input archivelog thread=1 sequence=7557 recid=7413 stamp=607195024
RMAN-08504: input archivelog thread=1 sequence=7558 recid=7414 stamp=607197980
RMAN-08504: input archivelog thread=1 sequence=7559 recid=7415 stamp=607203296
RMAN-08504: input archivelog thread=1 sequence=7560 recid=7416 stamp=607206851
RMAN-08504: input archivelog thread=1 sequence=7561 recid=7417 stamp=607210852
RMAN-08504: input archivelog thread=1 sequence=7562 recid=7418 stamp=607214068
RMAN-08504: input archivelog thread=1 sequence=7563 recid=7419 stamp=607219407
RMAN-08504: input archivelog thread=1 sequence=7564 recid=7420 stamp=607222892
RMAN-08009: channel ch2: starting archivelog backupset
RMAN-08502: set_count=11 set_stamp=607277714 creation_time=23-NOV-06
RMAN-08014: channel ch2: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=7565 recid=7421 stamp=607226609
RMAN-08504: input archivelog thread=1 sequence=7566 recid=7422 stamp=607230057
RMAN-08504: input archivelog thread=1 sequence=7567 recid=7423 stamp=607233889
RMAN-08504: input archivelog thread=1 sequence=7568 recid=7424 stamp=607237280
RMAN-08504: input archivelog thread=1 sequence=7569 recid=7425 stamp=607240323
RMAN-08504: input archivelog thread=1 sequence=7570 recid=7426 stamp=607246268
RMAN-08504: input archivelog thread=1 sequence=7571 recid=7427 stamp=607249353
RMAN-08504: input archivelog thread=1 sequence=7572 recid=7428 stamp=607252866
RMAN-08504: input archivelog thread=1 sequence=7573 recid=7429 stamp=607255895
RMAN-08009: channel ch3: starting archivelog backupset
RMAN-08502: set_count=12 set_stamp=607277714 creation_time=23-NOV-06
RMAN-08014: channel ch3: specifying archivelog(s) in backup set
RMAN-08504: input archivelog thread=1 sequence=7574 recid=7430 stamp=607258602
RMAN-08504: input archivelog thread=1 sequence=7575 recid=7431 stamp=607263927
RMAN-08504: input archivelog thread=1 sequence=7576 recid=7432 stamp=607267255
RMAN-08504: input archivelog thread=1 sequence=7577 recid=7433 stamp=607270179
RMAN-08504: input archivelog thread=1 sequence=7578 recid=7434 stamp=607273456
RMAN-08504: input archivelog thread=1 sequence=7579 recid=7435 stamp=607276564
RMAN-08504: input archivelog thread=1 sequence=7580 recid=7436 stamp=607277712
RMAN-08013: channel ch1: piece 1 created
RMAN-08503: piece handle=E:\RMANBAK\ARCH0AI34KKI_10_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:00:28
RMAN-08071: channel ch1: deleting archivelog(s)
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07556.001 recid=7412 stam
p=607193737
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07557.001 recid=7413 stam
p=607195024
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07558.001 recid=7414 stam
p=607197980
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07559.001 recid=7415 stam
p=607203296
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07560.001 recid=7416 stam
p=607206851
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07561.001 recid=7417 stam
p=607210852
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07562.001 recid=7418 stam
p=607214068
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07563.001 recid=7419 stam
p=607219407
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07564.001 recid=7420 stam
p=607222892
RMAN-08013: channel ch2: piece 1 created
RMAN-08503: piece handle=E:\RMANBAK\ARCH0BI34KKI_11_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:00:29
RMAN-08071: channel ch2: deleting archivelog(s)
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07565.001 recid=7421 stam
p=607226609
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07566.001 recid=7422 stam
p=607230057
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07567.001 recid=7423 stam
p=607233889
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07568.001 recid=7424 stam
p=607237280
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07569.001 recid=7425 stam
p=607240323
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07570.001 recid=7426 stam
p=607246268
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07571.001 recid=7427 stam
p=607249353
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07572.001 recid=7428 stam
p=607252866
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07573.001 recid=7429 stam
p=607255895
RMAN-08013: channel ch3: piece 1 created
RMAN-08503: piece handle=E:\RMANBAK\ARCH0CI34KKI_12_1 comment=NONE
RMAN-08525: backup set complete, elapsed time: 00:00:29
RMAN-08071: channel ch3: deleting archivelog(s)
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07574.001 recid=7430 stam
p=607258602
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07575.001 recid=7431 stam
p=607263927
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07576.001 recid=7432 stam
p=607267255
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07577.001 recid=7433 stam
p=607270179
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07578.001 recid=7434 stam
p=607273456
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07579.001 recid=7435 stam
p=607276564
RMAN-08514: archivelog filename=E:\DATABASE\ARCHIVE\ARC07580.001 recid=7436 stam
p=607277712
RMAN-03023: executing command: partial resync
RMAN-08003: starting partial resync of recovery catalog
RMAN-08005: partial resync complete
RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: ch1
RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: ch2
RMAN-03022: compiling command: release
RMAN-03023: executing command: release
RMAN-08031: released channel: ch3
RMAN>
我现在要恢复归档日志,该怎么做?请高手指点,多谢了!!
回复

使用道具 举报

千问 | 2006-11-3 01:02:53 | 显示全部楼层
RMAN只要备份好归档日志就可以了,不用显示的恢复归档日志,在需要归档日志的时候会自己恢复的!
回复

使用道具 举报

千问 | 2006-11-3 01:02:53 | 显示全部楼层
1、set archivelog destination =
2、restore archive log completed between "" and "";
回复

使用道具 举报

千问 | 2006-11-3 01:02:53 | 显示全部楼层
多些斑竹,按照您的方法已经搞定
回复

使用道具 举报

千问 | 2006-11-3 01:02:53 | 显示全部楼层
最初由 ZALBB 发布
[B]1、set archivelog destination =
2、restore archive log completed between "" and ""; [/B]

请教斑竹:
restore archivelog all;
为何不可以?
如果不指定destination的话会自动还原到指定的归档位置~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行