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: SQL.SQLCODE error numbers from SQL*Plus

Re: SQL.SQLCODE error numbers from SQL*Plus

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: 1996/11/29
Message-ID: <9ayW4NAuQvnyEw$+@jimsmith.demon.co.uk>#1/1

In article <01bbdb18$3a928700$b08577c2_at_earthbound.u-net.com>, Paul Routledge <paul_at_earthbound.u-net.com> writes
>Where would I get documentation on the SQL.SQLCODE error messages returned
>from SQL*Plus. I have a script which looks like this:
>
> -- SQL*Plus command file
> whenever sqlerror exit SQL.SQLCODE
>
> ... blah blah SQL blah ...
>
>When an error occurs in my SQL SQL*Plus returns an integer error number to
>my Unix shell script:
>
> # Unix shell script
> sqlplus user/pass @commandsfile.sql
>
> if [ $? ne 0 ] then
> do something with $?/ SQL.SQLCODE
> fi
>
>but I don't know what the error numbers returned are.
>

The values in SQL.SQLCODE are the normal oracle error numbers as documented in the "Error Messages and Codes Manual".

You should be aware that Unix exit codes are normally eight bits (maximum value 255) and the Oracle error number is likely to be truncated and therefore not meaninful by the time you are checking it in a shell script.

You can check for non-zero, but not for a meaningful value.

-- 
Jim Smith
Received on Fri Nov 29 1996 - 00:00:00 CST

Original text of this message

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