在測試服務器還原數據庫時遇到了ORA-19563錯誤。以下所示數據庫
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of switch command at 04/08/2015 19:59:06
ORA-19563: header validation failed for file
[oracle@getlnx01 ~]$ oerr ora 19563
19563, 00000, "%s header validation failed for file %s"
// *Cause: When opening the file to be placed in a copy or backup set,
// to be inspected, or used as the target for
// an incremental restore, its header was not
// recognized as a valid file header for a file of the indicated
// type (data file, archived log, or control file) belonging
// to the current database.
// *Action: Ensure that the correct files are being specified for the copy
// or backup operation.
經過分析後發現兩個文件名衝突,原數據庫有兩個同名的文件invsubmat_d18.dbf位於不一樣分區。我還原時,因爲測試服務器的空間不足,我將原路文件的恢復目錄作了調整。(因爲增長數據文件時粗枝大葉,本身給本身挖了一個大坑,並且本身跳了進去!) 服務器
以下所示,結果在/u04/oradata/epps目錄下,出現了兩個invsubmat_d19.dbf文件。只需在set命令裏面將文件恢復路徑修改便可。oracle
run
{
.................................................................
set newname for datafile 105 to "/u04/oradata/epps/invsubmat_d18.dbf";
.................................................................
set newname for datafile 109 to "/u04/oradata/epps/invsubmat_d18.dbf";
set newname for datafile 121 to "/u04/oradata/epps/ndotbs03.dbf";
set newname for datafile 122 to "/u04/oradata/epps/undotbs04.dbf";
restore database ;
switch datafile all;
}
修改成以下所示,restore還原成功! app
run
{
.................................................................
set newname for datafile 105 to "/u04/oradata/epps/invsubmat_d18.dbf";
.................................................................
set newname for datafile 109 to "/u04/oradata/epps/invsubmat_d20.dbf";
set newname for datafile 121 to "/u04/oradata/epps/ndotbs03.dbf";
set newname for datafile 122 to "/u04/oradata/epps/undotbs04.dbf";
restore database ;
switch datafile all;
}