Re: Unix Shell Script Help

From: Mike Haddon <m.haddon_at_tx.rr.com>
Date: Fri, 13 Feb 2009 00:05:30 -0600
Message-ID: <49950DAA.3000003_at_tx.rr.com>



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

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 13 2009 - 00:05:30 CST

Original text of this message