RMAN> restore controlfile from '/oracle/app/rmanbackup/hnzz_level0__20160323_0br181e1_1_1.dbf';
Starting restore at 24-MAR-2016 10:54:22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=31 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output file name=+ORADATA/hnzz/controlfile/current01.ctl
output file name=+FRA/hnzz/controlfile/current02.ctl
Finished restore at 24-MAR-2016 10:54:29
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> catalog start with '/oracle/app/rmanbackup/';
Starting implicit crosscheck backup at 24-MAR-2016 10:54:46
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=31 device type=DISK
Crosschecked 8 objects
Finished implicit crosscheck backup at 24-MAR-2016 10:54:48
Starting implicit crosscheck copy at 24-MAR-2016 10:54:48
using channel ORA_DISK_1
Finished implicit crosscheck copy at 24-MAR-2016 10:54:48
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: +fra/HNZZ/ARCHIVELOG/2016_03_23/thread_1_seq_2.260.907276447
File Name: +fra/HNZZ/ARCHIVELOG/2016_03_23/thread_1_seq_1.259.907277883
File Name: +fra/HNZZ/ARCHIVELOG/2016_03_23/thread_1_seq_2.258.907277885
File Name: +fra/HNZZ/ARCHIVELOG/2016_03_23/thread_1_seq_3.257.907277885
File Name: +fra/HNZZ/ARCHIVELOG/2016_03_23/thread_1_seq_1.261.907279535
File Name: +fra/HNZZ/ARCHIVELOG/2016_03_23/thread_1_seq_2.262.907279931
searching for all files that match the pattern /oracle/app/rmanbackup/
List of Files Unknown to the Database
=====================================
File Name: /oracle/app/rmanbackup/archive_level0__20160323_0fr181fl_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_09r181cd_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_0cr181ev_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_08r181cc_1_1.dbf
File Name: /oracle/app/rmanbackup/archive_level0__20160323_0dr181fl_1_1.dbf
File Name: /oracle/app/rmanbackup/archive_level0__20160323_0er181fl_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_0br181e1_1_1.dbf
yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /oracle/app/rmanbackup/archive_level0__20160323_0fr181fl_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_09r181cd_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_0cr181ev_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_08r181cc_1_1.dbf
File Name: /oracle/app/rmanbackup/archive_level0__20160323_0dr181fl_1_1.dbf
File Name: /oracle/app/rmanbackup/archive_level0__20160323_0er181fl_1_1.dbf
File Name: /oracle/app/rmanbackup/hnzz_level0__20160323_0br181e1_1_1.dbf
1,RMAN> run{
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> set newname for datafile 1 to '+ORADATA/hnzz/DATAFILE/system01.dbf';
7> set newname for datafile 2 to '+ORADATA/hnzz/DATAFILE/undotbs01.dbf';
8> set newname for datafile 3 to '+ORADATA/hnzz/DATAFILE/sysaux01.dbf';
9> set newname for datafile 4 to '+ORADATA/hnzz/DATAFILE/users01.dbf';
10> set newname for datafile 5 to '+ORADATA/hnzz/DATAFILE/example01.dbf';
11> set newname for datafile 6 to '+ORADATA/hnzz/DATAFILE/tbs_f1.dbf';
12> restore database;
13> release channel t1;
14> release channel t2;
15> release channel t3;
16> release channel t4;
17> }
allocated channel: t1
channel t1: SID=31 device type=DISK
allocated channel: t2
channel t2: SID=34 device type=DISK
allocated channel: t3
channel t3: SID=35 device type=DISK
allocated channel: t4
channel t4: SID=36 device type=DISK
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 24-MAR-2016 10:58:23
released channel: t1
released channel: t2
released channel: t3
released channel: t4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/24/2016 10:58:25
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
解决方法:
RMAN> LIST INCARNATION OF DATABASE hnzz;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 HNZZ 1541143681 PARENT 1 17-FEB-2008 01:50:35
2 2 HNZZ 1541143681 PARENT 464631 21-MAR-2016 17:42:29
3 3 HNZZ 1541143681 PARENT 532131 23-MAR-2016 21:10:23
4 4 HNZZ 1541143681 CURRENT 573401 23-MAR-2016 22:05:23
RMAN> RESET DATABASE TO INCARNATION 2;
database reset to incarnation 2
RMAN> run{
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> set newname for datafile 1 to '+ORADATA/hnzz/DATAFILE/system01.dbf';
7> set newname for datafile 2 to '+ORADATA/hnzz/DATAFILE/undotbs01.dbf';
8> set newname for datafile 3 to '+ORADATA/hnzz/DATAFILE/sysaux01.dbf';
9> set newname for datafile 4 to '+ORADATA/hnzz/DATAFILE/users01.dbf';
10> set newname for datafile 5 to '+ORADATA/hnzz/DATAFILE/example01.dbf';
11> set newname for datafile 6 to '+ORADATA/hnzz/DATAFILE/tbs_f1.dbf';
12> restore database until sequence 8;
13> release channel t1;
14> release channel t2;
15> release channel t3;
16> release channel t4;
17> }
allocated channel: t1
channel t1: SID=31 device type=DISK
allocated channel: t2
channel t2: SID=34 device type=DISK
allocated channel: t3
channel t3: SID=35 device type=DISK
allocated channel: t4
channel t4: SID=36 device type=DISK
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 24-MAR-2016 11:03:45
channel t1: starting datafile backup set restore
channel t1: specifying datafile(s) to restore from backup set
channel t1: restoring datafile 00002 to +ORADATA/hnzz/DATAFILE/undotbs01.dbf
channel t1: restoring datafile 00005 to +ORADATA/hnzz/DATAFILE/example01.dbf
channel t1: reading from backup piece /oracle/app/rmanbackup/hnzz_level0__20160323_0ar181cd_1_1.dbf
channel t2: starting datafile backup set restore
channel t2: specifying datafile(s) to restore from backup set
channel t2: restoring datafile 00001 to +ORADATA/hnzz/DATAFILE/system01.dbf
channel t2: restoring datafile 00004 to +ORADATA/hnzz/DATAFILE/users01.dbf
channel t2: reading from backup piece /oracle/app/rmanbackup/hnzz_level0__20160323_08r181cc_1_1.dbf
channel t3: starting datafile backup set restore
channel t3: specifying datafile(s) to restore from backup set
channel t3: restoring datafile 00003 to +ORADATA/hnzz/DATAFILE/sysaux01.dbf
channel t3: restoring datafile 00006 to +ORADATA/hnzz/DATAFILE/tbs_f1.dbf
channel t3: reading from backup piece /oracle/app/rmanbackup/hnzz_level0__20160323_09r181cd_1_1.dbf
channel t1: piece handle=/oracle/app/rmanbackup/hnzz_level0__20160323_0ar181cd_1_1.dbf tag=TAG20160323T224324
channel t1: restored backup piece 1
channel t1: restore complete, elapsed time: 00:01:15
channel t3: piece handle=/oracle/app/rmanbackup/hnzz_level0__20160323_09r181cd_1_1.dbf tag=TAG20160323T224324
channel t3: restored backup piece 1
channel t3: restore complete, elapsed time: 00:02:17
channel t2: piece handle=/oracle/app/rmanbackup/hnzz_level0__20160323_08r181cc_1_1.dbf tag=TAG20160323T224324
channel t2: restored backup piece 1
channel t2: restore complete, elapsed time: 00:02:57
Finished restore at 24-MAR-2016 11:06:43
released channel: t1
released channel: t2
released channel: t3
released channel: t4
RMAN> recover database until sequence 8;
Starting recover at 24-MAR-2016 11:07:50
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=31 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/24/2016 11:07:59
RMAN-06094: datafile 1 must be restored
RMAN> switch database to copy;
datafile 1 switched to datafile copy "+ORADATA/hnzz/datafile/system01.dbf"
datafile 2 switched to datafile copy "+ORADATA/hnzz/datafile/undotbs01.dbf"
datafile 3 switched to datafile copy "+ORADATA/hnzz/datafile/sysaux01.dbf"
datafile 4 switched to datafile copy "+ORADATA/hnzz/datafile/users01.dbf"
datafile 5 switched to datafile copy "+ORADATA/hnzz/datafile/example01.dbf"
datafile 6 switched to datafile copy "+ORADATA/hnzz/datafile/tbs_f1.dbf"
RMAN> run{
2> allocate channel t1 type disk;
3> allocate channel t2 type disk;
4> allocate channel t3 type disk;
5> allocate channel t4 type disk;
6> recover database until sequence 8;
7> release channel t1;
8> release channel t2;
9> release channel t3;
10> release channel t4;
11> }
allocated channel: t1
channel t1: SID=31 device type=DISK
allocated channel: t2
channel t2: SID=34 device type=DISK
allocated channel: t3
channel t3: SID=35 device type=DISK
allocated channel: t4
channel t4: SID=36 device type=DISK
Starting recover at 24-MAR-2016 11:12:45
starting media recovery
channel t1: starting archived log restore to default destination
channel t1: restoring archived log
archived log thread=1 sequence=7
channel t1: reading from backup piece /oracle/app/rmanbackup/archive_level0__20160323_0fr181fl_1_1.dbf
channel t1: piece handle=/oracle/app/rmanbackup/archive_level0__20160323_0fr181fl_1_1.dbf tag=TAG20160323T224509
channel t1: restored backup piece 1
channel t1: restore complete, elapsed time: 00:00:15
archived log file name=+FRA/hnzz/archivelog/2016_03_24/thread_1_seq_7.263.907326777 thread=1 sequence=7
channel default: deleting archived log(s)
archived log file name=+FRA/hnzz/archivelog/2016_03_24/thread_1_seq_7.263.907326777 RECID=9 STAMP=907326782
media recovery complete, elapsed time: 00:00:02
Finished recover at 24-MAR-2016 11:13:10
released channel: t1
released channel: t2
released channel: t3
released channel: t4
RMAN>
阅读(2107) | 评论(0) | 转发(0) |