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*Loader exit status

Re: SQL*Loader exit status

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 04 Mar 2006 00:26:36 +0100
Message-ID: <32kh0216ulqolhog3jgk7vrfcr1515jmg7@4ax.com>


On Fri, 3 Mar 2006 23:24:49 +0100, "Homer Frey" <homerfrey_at_gmail.com> wrote:

> Hello,
>
>I have a Java class which calls the Oracle SQL*Loader to import data into a
>database-table (Oracle 9i).
>
>To check if everything worked fine I analyse the exit status of the
>SQL*Loader.
>
>My tests showed me the following exit status:
>
>0: All data was successfully imported
>1: Problems with connection to database or for instance table is already
>full
>2: Bad data, e.g. some data could not been imported
>
>But now I found out something peculiar which makes me some problems.
>
>This is my control file:
>
>INSERT
>INTO TABLE ms.TEST
>
>WHEN(01:03) != 'End'
>
>FIELDS TERMINATED BY ','
>
>(NR
>,
>NAME
>,
>AMOUNT
>,
>PRICE
>)
>
>
>As you can see I use a WHEN-condition to get the last row. And this makes me
>trouble.
>
>Because due to this condition I get an exit status of "2". But it works like
>I want: Import all data except the last line. So I expect a exit status of
>0. So why SQL*Loader throws exit status 2???
>
>Can I tell this SQL*Loader anyhow to give me a 0 when it not import all data
>due to the WHEN-condition? Have I to change the ctrl-file?
>
>Regards Homer
>

You are aware files use to end with an EOF marker, and this marker is respected by Sql*loader automagically?
So why do you have this kludge?
Remove the redundant last line and you will be ok.

--
Sybrand Bakker, Senior Oracle DBA
Received on Fri Mar 03 2006 - 17:26:36 CST

Original text of this message

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