Sunday, March 4, 2012

Restore database with rman -- 'exclude tablespace' and fixing RMAN-06054


if u take rman backup with exclude tablespace and restore database with this script 

run {
set until time "to_date('2012-02-28 00:00:00','YYYY-MM-DD HH24:MI:SS')";
restore database;
recover database;
alter database open resetlogs;
}



u will get this error;

RMAN-06054: media recovery requesting unknown log:

u need to perform offline drop for excluded tablespace;

first of all;

rman> alter database open resetlogs;

ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39:

as u see data file 39 need to be droped ;

so just drop it offline;

RMAN> sql 'alter database datafile 39 offline drop';

sql statement: alter database datafile 39 offline drop

RMAN> alter database open resetlogs;

database opened


thats it..





No comments:

Post a Comment