Works like Charm.. Thank you Mike Haddon. All set. :-) Bala On Fri, Feb 13, 2009 at 1:05 AM, Mike Haddon <m.haddon@xxxxxxxxx> wrote: > What are you trying to accomplish? > > Are you trying to script a recovery and to break out of it when the last > available archive is applied? > > If that is the case use a herelist and put AUTO in the herelist and an exit > after the > AUTO,.. when the last available archive is applied the exit will get > executed and the sqlplus session will end. > > For example > > sqlplus "/ as sysdba" <<EOF > recover database using backup controlfile until cancel; > AUTO > exit > EOF > > The <<EOF causes each line to be passed to the program (sqlplus) as the > program > does a read on the standard input descriptor. > > When the exit is passed sqlplus will exit and the last EOF ends the > herelist > > Hope this helps > > Mike > > > Bala wrote: > >> How do i supply "Cancel" in a Unix Shell script after the SQLPLUS command >> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL; >> any tips/ suggestions highly appreciated. >> Thanks in Advance >> ( Hot backup, HP unix, Oracle 10.2.0.4) >> >> -- >> Bala Rao >> > > > -- Bala Rao