[oracle@rac2 ~]$ srvctl start database -d racdb -o mount [oracle@rac2 ~]$ rman target sys/123456@racdb Recovery Manager: Release 10.2.0.5.0 - Production on Sun Dec 18 14:41:03 2011 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: RACDB (DBID=766822397, not open) RMAN> restore database; RMAN> recover database; Starting recover at 2011-12-18 14:45:05 using channel ORA_DISK_1 starting media recovery archive log thread 1 sequence 50 is already on disk as file /u01/app/oracle/rac1_archivelog/1_50_769205632.dbf archive log thread 1 sequence 51 is already on disk as file /u01/app/oracle/rac1_archivelog/1_51_769205632.dbf archive log thread 1 sequence 52 is already on disk as file /u01/app/oracle/rac1_archivelog/1_52_769205632.dbf archive log thread 1 sequence 53 is already on disk as file /u01/app/oracle/rac1_archivelog/1_53_769205632.dbf RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 12/18/2011 14:45:07 RMAN-06053: unable to perform media recovery because of missing log RMAN-06025: no backup of log thread 2 seq 28 lowscn 1018689 found to restore RMAN-06025: no backup of log thread 2 seq 27 lowscn 1018577 found to restore RMAN-06025: no backup of log thread 2 seq 26 lowscn 1016111 found to restore 这里就算定义了通道进行恢复,一样会报错如下 [oracle@rac2 ~]$ rman target sys/123456@racdb Recovery Manager: Release 10.2.0.5.0 - Production on Sun Dec 18 15:07:17 2011 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: RACDB (DBID=766822397, not open) RMAN> run { 2> allocate channel c1 device type disk connect sys/123456@racdb1; 3> allocate channel c2 device type disk connect sys/123456@racdb2; 4> restore database; 5> recover database; 6> }; using target database control file instead of recovery catalog allocated channel: c1 channel c1: sid=152 instance=racdb1 devtype=DISK allocated channel: c2 channel c2: sid=148 instance=racdb2 devtype=DISK Starting restore at 2011-12-18 15:07:39 skipping datafile 2; already restored to file +DATA/racdb/datafile/undotbs1.258.769205541 skipping datafile 5; already restored to file +DATA/racdb/datafile/example.264.769205649 skipping datafile 6; already restored to file +DATA/racdb/datafile/undotbs2.265.769205765 skipping datafile 1; already restored to file +DATA/racdb/datafile/system.256.770222569 skipping datafile 3; already restored to file +DATA/racdb/datafile/sysaux.257.770222575 skipping datafile 4; already restored to file +DATA/racdb/datafile/users.259.769960507 Finished restore at 2011-12-18 15:07:40 Starting recover at 2011-12-18 15:07:40 starting media recovery archive log thread 1 sequence 50 is already on disk as file /u01/app/oracle/rac1_archivelog/1_50_769205632.dbf archive log thread 1 sequence 51 is already on disk as file /u01/app/oracle/rac1_archivelog/1_51_769205632.dbf archive log thread 1 sequence 52 is already on disk as file /u01/app/oracle/rac1_archivelog/1_52_769205632.dbf archive log thread 1 sequence 53 is already on disk as file /u01/app/oracle/rac1_archivelog/1_53_769205632.dbf released channel: c1 released channel: c2 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 12/18/2011 15:07:42 RMAN-06053: unable to perform media recovery because of missing log RMAN-06025: no backup of log thread 2 seq 28 lowscn 1018689 found to restore RMAN-06025: no backup of log thread 2 seq 27 lowscn 1018577 found to restore RMAN-06025: no backup of log thread 2 seq 26 lowscn 1016111 found to restore 需要将归档日志复制到执行恢复操作的节点上,在本例中:将rac2的归档日志复制到rac1上,在rac1上面执行恢复操作 [oracle@rac2 ~]$ scp -rp /u01/app/oracle/rac2_archivelog rac1:/u01/app/oracle/ [oracle@rac1 ~]$ rman target / Recovery Manager: Release 10.2.0.5.0 - Production on Mon Dec 19 11:18:58 2011 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: RACDB (DBID=766822397, not open) RMAN> restore database; Starting restore at 2011-12-19 11:19:19 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=145 instance=racdb1 devtype=DISK skipping datafile 2; already restored to file +DATA/racdb/datafile/undotbs1.258.769205541 skipping datafile 5; already restored to file +DATA/racdb/datafile/example.264.769205649 skipping datafile 6; already restored to file +DATA/racdb/datafile/undotbs2.265.769205765 skipping datafile 1; already restored to file +DATA/racdb/datafile/system.256.770222569 skipping datafile 3; already restored to file +DATA/racdb/datafile/sysaux.257.770222575 skipping datafile 4; already restored to file +DATA/racdb/datafile/users.259.769960507 restore not done; all files readonly, offline, or already restored Finished restore at 2011-12-19 11:19:20 RMAN> recover database; Starting recover at 2011-12-19 11:22:17 using channel ORA_DISK_1 starting media recovery archive log thread 1 sequence 50 is already on disk as file /u01/app/oracle/rac1_archivelog/1_50_769205632.dbf archive log thread 1 sequence 51 is already on disk as file /u01/app/oracle/rac1_archivelog/1_51_769205632.dbf archive log thread 1 sequence 52 is already on disk as file /u01/app/oracle/rac1_archivelog/1_52_769205632.dbf archive log thread 1 sequence 53 is already on disk as file /u01/app/oracle/rac1_archivelog/1_53_769205632.dbf archive log thread 2 sequence 26 is already on disk as file /u01/app/oracle/rac2_archivelog/2_26_769205632.dbf archive log thread 2 sequence 27 is already on disk as file /u01/app/oracle/rac2_archivelog/2_27_769205632.dbf archive log thread 2 sequence 28 is already on disk as file /u01/app/oracle/rac2_archivelog/2_28_769205632.dbf channel ORA_DISK_1: starting archive log restore to default destination channel ORA_DISK_1: restoring archive log archive log thread=1 sequence=49 channel ORA_DISK_1: reading from backup piece +FRA/racdb/backupset/2011_12_18/annnf0_db_full_bak_20111218_0.268.770221011 channel ORA_DISK_1: restored backup piece 1 piece handle=+FRA/racdb/backupset/2011_12_18/annnf0_db_full_bak_20111218_0.268.770221011 tag=DB_FULL_BAK_20111218 channel ORA_DISK_1: restore complete, elapsed time: 00:00:02 archive log filename=/u01/app/oracle/rac1_archivelog/1_49_769205632.dbf thread=1 sequence=49 channel ORA_DISK_1: starting archive log restore to default destination channel ORA_DISK_1: restoring archive log archive log thread=2 sequence=25 channel ORA_DISK_1: reading from backup piece +FRA/racdb/backupset/2011_12_18/annnf0_db_full_bak_20111218_0.269.770221009 channel ORA_DISK_1: restored backup piece 1 piece handle=+FRA/racdb/backupset/2011_12_18/annnf0_db_full_bak_20111218_0.269.770221009 tag=DB_FULL_BAK_20111218 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 archive log filename=/u01/app/oracle/rac1_archivelog/2_25_769205632.dbf thread=2 sequence=25 archive log filename=/u01/app/oracle/rac2_archivelog/2_26_769205632.dbf thread=2 sequence=26 archive log filename=/u01/app/oracle/rac1_archivelog/1_50_769205632.dbf thread=1 sequence=50 archive log filename=/u01/app/oracle/rac1_archivelog/1_51_769205632.dbf thread=1 sequence=51 archive log filename=/u01/app/oracle/rac1_archivelog/1_52_769205632.dbf thread=1 sequence=52 archive log filename=/u01/app/oracle/rac2_archivelog/2_27_769205632.dbf thread=2 sequence=27 media recovery complete, elapsed time: 00:00:24 Finished recover at 2011-12-19 11:22:45 |