Re: Unix Shell Script Help
Date: Fri, 13 Feb 2009 00:05:30 -0600
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.
sqlplus "/ as sysdba" <<EOF
recover database using backup controlfile until cancel; AUTO
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
> How do i supply "Cancel" in a Unix Shell script after the SQLPLUS
> 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