I am using Oracle version 8.1.6. I am loading a flat file having 320,751 records through SQL*Loader, and 50,000 records are succesfully loaded if I am not using the direct method. But, only 2,780 records are loaded if I am using direct path loading.
My control file has the following contents:
load data INFILE "1orp" into table cust_crs_ref_table fields terminated by "|" trailing nullcols ( custid, intid )
A sample of flat file is:
11778646|||| 11778647|||| 11778648|||| 11778649|1418213372|||
First, I would suggest not using the Direct Load method. This file is not too big. Additionally, Direct Load had its fair share of problems in Oracle 8.1.6.
Second, you'll need to find why only 50,000 records were imported out of 320,000 records. For that, you'll need to ensure that you have told SQL*Loader that you want to use a "bad" file and a "discard" file. The bad file is a file of records that were rejected during your load. The discard file is a file of records that were filtered out due to your criteria. You are not filtering records from your text file, so the discard file should be empty. You can specify a bad file and a discard file in your control file with the following lines:
BADFILE '/directory/bad_file_name' DISCARDFILE '/directory/discard_file_name'
This was first published in September 2004