SQL*Loader Problems

From: Peter A Huegler <phuegler_at_epix.net>
Date: 1998/10/07
Message-ID: <6vgi1l$3k2$1_at_news.ses.cio.eds.com>#1/1


Hi All:

I'm having 2 problems with SQL*Loader right now. I was wondering if anyone has any ideas that can help me.

First the background - I am running NT 4.0 service pack 3. I have the Oracle client software 8.0.5.0.0 installed.

My first problem is that sqlldr80.exe does not appear to be returning error codes. After reading the oracle documentation, I am expecting several different return codes based on what happens in the loader run. I run a control file with obvious syntax errors and sqlldr80.exe returns a success
(0). When I run this same control file on a 7.3.4 client (using
sqlldr73.exe), I get an error code returned. What gives?

My second problem deals with my data files. I am getting ASCII flat files with fixed-length records and each record is terminated with a CR/LF. Pretty plain vanilla. The only odd thing about these files is that there is a end-of-file character (ascii 26) after the last record. When using the 8.0.5 version of sql*loader, I get the following error and the load ends.

SQL*Loader-524: partial record found at end of datafile (test1.)

Again, when I use sql*loader on the 7.3.4 client, the data is loaded successfully with no errors. What gives?

Any help on these matters will be greatly appreciated.

TIA Pete

Here is the batch file I am using to test the error returns:

sqlldr80 scott/tiger_at_sag test1.ctl
if not errorlevel 1 goto end
echo error
:end
echo finished

Here is the control file I am using generate the syntax error. I also use a syntactically correct version to load my data:

OPTIONS(LOG='test1.log')
LOAD DATA
INFILE 'test1.'
BADFILE 'test1.bad'
DISCARDFILE 'test1.dis'
DISCARDMAX 100
TRUNCATE

INnnnnTO TABLE EMP                    <--- obvious syntax error

(
empno SEQUENCE(1,1) , ename POSITION(1:10) CHAR , sal POSITION(11:15) DECIMAL EXTERNAL
)

And finally my data files are similiar to this (replace <CR/LF> with a carriage return and line feed and replate the <EOF> with an ascii 26):

SMITH 10000<CR/LF>
JONES 12000<CR/LF>
DOE 23000<CR/LF>
<EOF> Received on Wed Oct 07 1998 - 00:00:00 CEST

Original text of this message