Re: SQL*PLUS interrupt question
From: Andrew May CMIS <amay_at_colesmyer.com.au>
Date: Tue, 4 Jan 94 22:29:09 GMT
Message-ID: <1994Jan4.222909.28670_at_colesmyer.com.au>
Date: Tue, 4 Jan 94 22:29:09 GMT
Message-ID: <1994Jan4.222909.28670_at_colesmyer.com.au>
In article <CJ42wI.1wF_at_ncrcae.columbiasc.ncr.com>,
Sanjeev.Agrawal <sanju_at_churchill.ColumbiaSC.NCR.COM> wrote:
>
>I am running an sqlplus script from command line in silence mode.
>If user interrupts the operatin the control remains in sqlplus
>and it does not come back to operating system.
>
Try adding the following statement at the start of your script:
Whenever sqlerror exit failure rollback;
This will:
- Exit to the Operating System.
- Return a failure status to the Operating System.
- Rollback any uncommitted transactions in your sql session.
Note: even though you say "exit failure", changes will be committed.
you need the optional keyword "rollback" to ensure your changes are rolled back. Reference: V6 SQL*Plus User Guide & REference P 6-77. V7 ?
Hope it helps,
Andrew.
--------------------------------------*--------------------------------------- N. Andrew May. | Database Administrator Coles-Myer Ltd | President VOUG 53 Hoddle Street, Collingwood, | Tel: +61 3 483 7389. Fax: 483 7381 Melbourne, Australia 3066. | E-mail: amay_at_colesmyer.com.au --------------------------------------*---------------------------------------
-- --------------------------------------*--------------------------------------- N. Andrew May. | Database Administrator Coles-Myer Ltd | President VOUG 53 Hoddle Street, Collingwood, | Tel: +61 3 483 7389. Fax: 483 7381Received on Tue Jan 04 1994 - 23:29:09 CET