一:问题描述
我用指定备份集恢复时,报错:
RMAN> run {
2> shutdown immediate;
3> startup mount;
4> allocate channel c1 type disk;
5> allocate channel c2 type disk;
6> restore database from tag=‘TAG20140829T020210‘; --从指定备份集中进行转储
7> recover database;
8> alter database open;
9> }
database closed
database dismounted
Oracle instance shut down
connected to target database (not started)
Oracle instance started
database mounted
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 113247824 bytes
Database Buffers 167772160 bytes
Redo Buffers 2973696 bytes
allocated channel: c1
channel c1: sid=151 instance=prod1 devtype=DISK
allocated channel: c2
channel c2: sid=142 instance=prod1 devtype=DISK
Starting restore at 29-AUG-14
released channel: c1
released channel: c2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/29/2014 02:31:20
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to 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 备份的信息,这时进行恢复就会遇到RMAN-06023 的错误。
三:解决办法
1:先在nomount状态下恢复包含此备份信息的控制文件
2:将数据库启动至mount状态
3:恢复数据库(restore database;recover database;)