Starting recover at 24-SEP-14
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_118_859047306.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_119_859047306.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_118_859047306.bak tag=TAG20140923T161506
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_125_859048203.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_125_859048203.bak tag=TAG20140923T163003
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_119_859047306.bak tag=TAG20140923T161506
channel ORA_DISK_2: restore complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_132_859049103.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_126_859048203.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_132_859049103.bak tag=TAG20140923T164503
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_126_859048203.bak tag=TAG20140923T163003
channel ORA_DISK_2: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_133_859049103.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_133_859049103.bak tag=TAG20140923T164503
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
starting media recovery
archive log thread 1 sequence 90 is already on disk as file /arch/1_90_858969934.dbf
archive log thread 1 sequence 91 is already on disk as file /arch/1_91_858969934.dbf
archive log thread 1 sequence 92 is already on disk as file /disk1/prod/redo01.log
archive log thread 1 sequence 93 is already on disk as file /disk1/prod/redo02.log
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 2 was not restored from a sufficiently old backup
ORA-01110: data file 2: '/u01/app/oracle/oradata/prod/undotbs01.dbf'
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/24/2014 17:34:18
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 89 lowscn 647354 found to restore
RMAN-06025: no backup of log thread 1 seq 88 lowscn 647258 found to restore
RMAN-06025: no backup of log thread 1 seq 87 lowscn 647242 found to restore
RMAN-06025: no backup of log thread 1 seq 86 lowscn 646972 found to restore
RMAN-06025: no backup of log thread 1 seq 85 lowscn 646637 found to restore
RMAN-06025: no backup of log thread 1 seq 84 lowscn 646623 found to restore
RMAN-06025: no backup of log thread 1 seq 83 lowscn 646593 found to restore
RMAN-06025: no backup of log thread 1 seq 82 lowscn 645884 found to restore
RMAN-06025: no backup of log thread 1 seq 81 lowscn 645864 found to restore
RMAN-06025: no backup of log thread 1 seq 80 lowscn 645835 found to restore
RMAN-06025: no backup of log thread 1 seq 79 lowscn 645431 found to restore
RMAN-06025: no backup of log thread 1 seq 78 lowscn 645415 found to restore
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
162 Full 1.06M DISK 00:00:01 23-SEP-14
BP Key: 191 Status: AVAILABLE Compressed: YES Tag: TAG20140923T174510
Piece Name: /backup/rman_bak/ctl1_166.bak
Control File Included: Ckp SCN: 645423 Ckp time: 23-SEP-14
Starting restore at 24-SEP-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=156 devtype=DISK
channel ORA_DISK_2: starting datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/prod/system01.dbf
restoring datafile 00004 to /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lv0_PROD_139_859050004.bak
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u01/app/oracle/oradata/prod/undotbs01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/prod/sysaux01.dbf
restoring datafile 00005 to /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lv0_PROD_140_859050004.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lv0_PROD_140_859050004.bak tag=TAG20140923T170004
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lv0_PROD_139_859050004.bak tag=TAG20140923T170004
channel ORA_DISK_2: restore complete, elapsed time: 00:00:35
Finished restore at 24-SEP-14
查看转储后的数据文件和控制文件的checkpoint:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SQL> col name for a50
SQL> r
1* select name ,checkpoint_change# from v$datafile
NAME CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf 645405
/u01/app/oracle/oradata/prod/undotbs01.dbf 645407
/u01/app/oracle/oradata/prod/sysaux01.dbf 645407
/u01/app/oracle/oradata/prod/users01.dbf 645405
/u01/app/oracle/oradata/prod/example01.dbf 645407
SQL> select name ,checkpoint_change# from v$datafile_header;
NAME CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf 644119
/u01/app/oracle/oradata/prod/undotbs01.dbf 644121
/u01/app/oracle/oradata/prod/sysaux01.dbf 644121
/u01/app/oracle/oradata/prod/users01.dbf 644119
/u01/app/oracle/oradata/prod/example01.dbf 644121
Starting recover at 24-SEP-14
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_146_859050904.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_147_859050904.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_146_859050904.bak tag=TAG20140923T171504
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_153_859051804.bak
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_147_859050904.bak tag=TAG20140923T171504
channel ORA_DISK_2: restore complete, elapsed time: 00:00:02
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_154_859051804.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_153_859051804.bak tag=TAG20140923T173003
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_154_859051804.bak tag=TAG20140923T173003
channel ORA_DISK_2: restore complete, elapsed time: 00:00:02
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: /u01/app/oracle/oradata/prod/system01.dbf
destination for restore of datafile 00004: /u01/app/oracle/oradata/prod/users01.dbf
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/lvl1_PROD_160_859052703.bak
channel ORA_DISK_2: starting incremental datafile backupset restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
destination for restore of datafile 00002: /u01/app/oracle/oradata/prod/undotbs01.dbf
destination for restore of datafile 00003: /u01/app/oracle/oradata/prod/sysaux01.dbf
destination for restore of datafile 00005: /u01/app/oracle/oradata/prod/example01.dbf
channel ORA_DISK_2: reading from backup piece /backup/rman_bak/lvl1_PROD_161_859052703.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_160_859052703.bak tag=TAG20140923T174503
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_2: restored backup piece 1
piece handle=/backup/rman_bak/lvl1_PROD_161_859052703.bak tag=TAG20140923T174503
channel ORA_DISK_2: restore complete, elapsed time: 00:00:01
starting media recovery
archive log thread 1 sequence 92 is already on disk as file /disk1/prod/redo01.log
archive log thread 1 sequence 93 is already on disk as file /disk1/prod/redo02.log
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=77
channel ORA_DISK_1: reading from backup piece /backup/rman_bak/arch1_165.bak
channel ORA_DISK_1: restored backup piece 1
piece handle=/backup/rman_bak/arch1_165.bak tag=TAG20140923T174507
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
archive log filename=/arch/1_77_858969934.dbf thread=1 sequence=77
unable to find archive log
archive log thread=1 sequence=78
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/24/2014 17:44:48
RMAN-06054: media recovery requesting unknown log: thread 1 seq 78 lowscn 645415
recover failure,提示缺少archivelog ,做不完全恢复!
1
2
3
4
5
6
7
8
9
10
11
RMAN> run {
2> set until sequence 78;
3> recover database;
4> }
executing command: SET until clause
Starting recover at 24-SEP-14
using channel ORA_DISK_1
using channel ORA_DISK_2
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 24-SEP-14
recover完成! 查看恢复后的database checkpoint:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SQL> select name ,checkpoint_change# from v$datafile;
NAME CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf 645415
/u01/app/oracle/oradata/prod/undotbs01.dbf 645415
/u01/app/oracle/oradata/prod/sysaux01.dbf 645415
/u01/app/oracle/oradata/prod/users01.dbf 645415
/u01/app/oracle/oradata/prod/example01.dbf 645415
SQL> select name ,checkpoint_change# from v$datafile_header;
NAME CHECKPOINT_CHANGE#
-------------------------------------------------- ------------------
/u01/app/oracle/oradata/prod/system01.dbf 645415
/u01/app/oracle/oradata/prod/undotbs01.dbf 645415
/u01/app/oracle/oradata/prod/sysaux01.dbf 645415
/u01/app/oracle/oradata/prod/users01.dbf 645415
/u01/app/oracle/oradata/prod/example01.dbf 645415
打开数据库: RMAN> alter database open resetlogs;
database opened
@数据库open成功,至此,数据库恢复完成!