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

Search Discussions

  • Matthew Zito at Feb 13, 2009 at 4:51 am
    Do you mean the string "cancel", or a control-c terminator? If it's the string "cancel", I would do that in perl, since you can open a program as a bi-directional process. If you just want to send control-c, you can have a forked process that watches the sqlplus command and sends a SIGINT when the right moment comes (check your OS, but on my box that's a kill -2).

    Matt

    --
    Matthew Zito
    Chief Scientist
    GridApp Systems
    P: 646-452-4090
    mzito_at_gridapp.com
    http://www.gridapp.com

    -----Original Message-----
    From: oracle-l-bounce_at_freelists.org on behalf of Bala
    Sent: Thu 2/12/2009 11:17 PM
    To: oracle-l
    Subject: Unix Shell Script Help


    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
  • Mike Haddon at Feb 13, 2009 at 6:05 am
    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" < 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
  • Mayen.Shah_at_lazard.com at Feb 13, 2009 at 3:09 pm
    #!/usr/bin/ksh
    #

    $ORACLE_HOME/bin/sqlplus -s /nolog <
    Sent by: oracle-l-bounce_at_freelists.org
    Feb 12 2009 11:17 PM
    Please respond to
    oratips_at_gmail.com

    To
    "oracle-l"
    cc

    Subject
    Unix Shell Script Help

    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)
  • Mike Haddon at Feb 13, 2009 at 11:47 pm
    That will cancel before applying any archives

    Mike

    Mayen.Shah_at_lazard.com wrote:
    #!/usr/bin/ksh
    #

    $ORACLE_HOME/bin/sqlplus -s /nolog <
    connect /as sysdba;

    RECOVER database using backup controlfile until cancel;
    cancel
    exit 0;
    eof1


    HTH
    Mayen





    *"Bala" *
    Sent by: oracle-l-bounce_at_freelists.org

    Feb 12 2009 11:17 PM
    Please respond to
    oratips_at_gmail.com



    To
    "oracle-l"
    cc

    Subject
    Unix Shell Script Help




    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
  • Mayen.Shah_at_lazard.com at Feb 15, 2009 at 8:52 pm
    Thanks for your comments, Mike.
    I was responding to OP's requirement of how to "CANCEL" recovery. In old
    days when I was cloning database outside of RMAN, I was using combination
    of AUTO and CANCEL to perform recovery upto last available arch log.

    #!/usr/bin/ksh
    #

    $ORACLE_HOME/bin/sqlplus -s /nolog <
    Sent by: oracle-l-bounce_at_freelists.org
    Feb 13 2009 06:47 PM
    Please respond to
    m.haddon_at_tx.rr.com

    To
    "oracle-l"
    cc

    Subject
    Re: Unix Shell Script Help

    That will cancel before applying any archives

    Mike

    Mayen.Shah_at_lazard.com wrote:

    #!/usr/bin/ksh
    #

    $ORACLE_HOME/bin/sqlplus -s /nolog <
    Sent by: oracle-l-bounce_at_freelists.org
    Feb 12 2009 11:17 PM

    Please respond to
    oratips_at_gmail.com

    To
    "oracle-l"
    cc

    Subject
    Unix Shell Script Help

    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)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedFeb 13, '09 at 4:17a
activeFeb 15, '09 at 8:52p
posts6
users4
websiteoracle.com

People

Translate

site design / logo © 2022 Grokbase