Re: Unix Shell Script Help

From: Mike Haddon <>
Date: Fri, 13 Feb 2009 00:05:30 -0600
Message-ID: <>

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
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


Bala wrote:
> How do i supply "Cancel" in a Unix Shell script after the SQLPLUS
> command
> any tips/ suggestions highly appreciated.
> Thanks in Advance
> ( Hot backup, HP unix, Oracle
> --
> Bala Rao

Received on Fri Feb 13 2009 - 00:05:30 CST

Original text of this message