Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL.SQLCODE error numbers from SQL*Plus
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 SmithReceived on Fri Nov 29 1996 - 00:00:00 CST
![]() |
![]() |