Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Exit status of sqlplus

Re: Exit status of sqlplus

From: Edward Rusu <erusu_at_softcomputer.com>
Date: Fri, 8 Jan 1999 19:07:43 -0500
Message-ID: <7766oh$29m$1@scream.jriver.com>

Benjamin Peikes <benp_at_dtgroup.com> wrote in message news:775k25$2q1$1_at_news.dtgroup.com...>I am writing an application on a Sun that uses the system call to call
>sqlplus using a certain file. How can I check to see if it was successful?
>It seems to return 0 even on error.

    Hi,
Try to use SQL's command WHENEVER SQLERROR

Purpose
Exits SQL*Plus if a SQL command or PL/SQL block generates an error.

Syntax

WHENEVER SQLERROR {EXIT [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable] [COMMIT|ROLLBACK]|CONTINUE [COMMIT|ROLLBACK|NONE]} Sincerely yours,

Edd Received on Fri Jan 08 1999 - 18:07:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US