RMAN-06094: datafile 1 must be restored ID 1339439.1
Posted fengaix6
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RMAN-06094: datafile 1 must be restored ID 1339439.1相关的知识,希望对你有一定的参考价值。
【转自】:https://blog.csdn.net/u010692693/article/details/78537018
一次Data Guard断档,主端归档日志被删除,通过基于SCN在主端做增量备份,备端recover database时出现类似以下报错:
-
RMAN> RECOVER DATABASE;
-
-
Starting recover at 18 JUL 2011 18:12:10
-
allocated channel: ORA_DISK_1
-
channel ORA_DISK_1: sid=267 devtype=DISK
-
RMAN-00571: ===========================================================
-
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
-
RMAN-00571: ===========================================================
-
RMAN-03002: failure of recover command at 07/18/2011 18:12:11
-
RMAN-06094: datafile 1 must be restored
搜索MOS发现以下文章,完美解决问题:
RMAN-06094 or RMAN-06571 During Recovery or Switch to Copy at Standby Site (文档 ID 1339439.1)
尝试从增量备份恢复数据库时,遇到以下错误:
-
RMAN> RECOVER DATABASE NOREDO;
-
-
Starting recover at 18 JUL 2011 18:12:10
-
allocated channel: ORA_DISK_1
-
channel ORA_DISK_1: sid=267 devtype=DISK
-
RMAN-00571: ===========================================================
-
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
-
RMAN-00571: ===========================================================
-
RMAN-03002: failure of recover command at 07/18/2011 18:12:11
-
RMAN-06094: datafile 1 must be restored
Further, there doesn‘t appear to be a valid copy of the datafiles to use:
此外,似乎没有要使用的数据文件的有效副本:
-
RMAN> SWITCH DATABASE TO COPY;
-
-
RMAN-00571: ===========================================================
-
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
-
RMAN-00571: ===========================================================
-
RMAN-03002: failure of switch to copy command at 07/18/2011 17:10:17
-
RMAN-06571: datafile 1 does not have recoverable copy
Note: Even though the above is reporting errors on datafile 1, this is not necessarily the full extent of the problem. Rather than printing an error message for each file in question (imagine a system with five thousand or more datafiles!), RMAN is only showing you the first file with a problem.
注:即使上面报告数据文件1的错误,这不一定是问题的全部范围。 而不是为每个有问题的文件打印错误消息(想象一下有五千个或更多数据文件的系统!),RMAN只会向您显示出现问题的第一个文件。
The errors RMAN-06094 or RMAN-06571 can be encountered after recreating the standby controlfile, where datafiles at the primary site reside in a different directory to the standby site.
重新创建备用控制文件后,可能会遇到错误RMAN-06094或RMAN-06571,其中主站点上的数据文件驻留在与备用站点不同的目录中。
When a standby controlfile is recreated, by restoring it from the primary site, the datafile names as shown in v$datafile and RMAN‘s REPORT SCHEMA will actually reflect those of the primary database rather than the standby database.
当重新创建备用控制文件时,通过从主站点恢复,v $ datafile和RMAN的REPORT SCHEMA中显示的数据文件名称实际上将反映主数据库的数据文件名称,而不是备用数据库。
RMAN> report schema;
Look at the SIZE and NAME columns. The SIZE of 0 is a good indication that the file does not physically exist on disk.
For example:
看看SIZE和NAME列。 0的SIZE 很好地表明该文件在物理上不存在于磁盘上。
例如:
-
File Size(MB) Tablespace RB segs Datafile Name
-
---- -------- ----------------- ------- ------------------------
-
1 0 SYSTEM *** +DG1/prod/datafile/system.423.756840583
-
2 0 UNDOTBS1 *** +DG1/prod/datafil/undotbs1.258.667475049
-
3 0 SYSAUX *** +DG1/prod/datafil/sysaux.257.667475049
-
4 0 USERS *** +DG1/prod/datafile/users.259.667475049
-
-
-
ASMCMD> ls -lt +DG1/prod/datafile/system.423.756840583
-
asmcmd: entry ‘prod‘ does not exist in directory ‘+DG1/‘
Often the datafiles do actually reside on disk in either a different directory or filename. So you just need to tell RMAN where they are.
1) If the datafiles are all in the same directory path, you can catalog them all with one command:
通常,数据文件实际上驻留在不同的目录或文件名中的磁盘上。 所以你只需要告诉RMAN他们在哪里。
1)如果数据文件都在相同的目录路径中,可以用一个命令将它们全部编目:
RMAN> catalog start with ‘full pathname‘;
Otherwise, to catalog an individual datafile:
否则,要编制一个单独的数据文件:
RMAN> catalog datafilecopy ‘full path filename‘;
2) Confirm that RMAN knows about the newly cataloged datafile copies:
2)确认RMAN知道新编目的数据文件副本:
-
RMAN> list copy of database;
-
-
RMAN> list copy of datafile n;
-
eg.
-
RMAN> list copy of datafile 1;
-
-
OR to list multiple copies:
-
RMAN> list copy of datafile 1,2,3,4;
3) Rename the datafiles to the correct copy on disk
a) If all datafiles needs to be renamed:
3)将数据文件重命名为磁盘上的正确副本
a)如果所有数据文件都需要重命名:
RMAN> switch database to copy;
b) If only renaming a single datafile:
b)如果只重命名单个数据文件:
-
RMAN> switch datafile n to copy;
-
eg.
-
RMAN> switch datafile 1 to copy;
c) If renaming a list of files:
c)如果重命名文件列表:
-
RMAN> switch datafile n,o,p,q to copy;
-
eg.
-
RMAN> switch datafile 1,2,3,4 to copy;
d) to rename to a specific copy:
d)重命名为特定副本:
-
RMAN> run{
-
switch datafile ‘old datafile path and name‘ to datafilecopy ‘new datafile path and name‘;
-
}
4) The controlfile should now reflect the real datafiles on disk, with their correct size and names.
4)控制文件现在应该反映磁盘上的真实数据文件,其正确的大小和名称。
-
RMAN> report schema;
-
-
File Size(MB) Tablespace RB segs Datafile Name
-
---- -------- ----------------- ------- ------------------------
-
1 500 SYSTEM *** +DG1/stby/datafile/system.423.756840583
-
2 200 UNDOTBS1 *** +DG1/stby/datafile/undotbs1.258.667475049
-
3 350 SYSAUX *** +DG1/stby/datafile/sysaux.257.756996199
-
4 545 USERS *** +DG1/stby/datafile/users.259.756996261
以上是关于RMAN-06094: datafile 1 must be restored ID 1339439.1的主要内容,如果未能解决你的问题,请参考以下文章
RMAN-06555: datafile 1 must be restored from backup created before ***
RMAN-06555: datafile 1 must be restored from backup created before ***
RMAN-06555: datafile 1 must be restored from backup created before ***
ORA-01113: 文件 1 需要介质恢复ORA-01110: 数据文件 1: ‘+DATA/yjt/datafile/system.256.994538163‘
ORA-01113: 文件 1 需要介质恢复ORA-01110: 数据文件 1: ‘+DATA/yjt/datafile/system.256.994538163‘
冷备手工完全恢复(recover database,recover tablespace,recover datafile)