#Recovers a ARCHIVELOG database from LOSS OF A DATAFILE
# Database is Open
#Datafile Recovery
#Datafile is restored to a new location

 
run {
allocate channel c1 type disk;
allocate channel c2 type disk;
set newname for datafile '/u2/ORACLE/reco/tools01.dbf' to
'/u1/ORACLE/reco/tools01.dbf';
sql "alter database datafile ''/u2/ORACLE/reco/tools01.dbf'' offline";
restore datafile '/u1/ORACLE/reco/tools01.dbf' ;
switch datafile all;
recover datafile '/u1/ORACLE/reco/tools01.dbf' ;
sql "alter database datafile ''/u1/ORACLE/reco/tools01.dbf'' online ";
release channel c1;
release channel c2;
}

Hosted by www.Geocities.ws

1