Ask the Expert

Incomplete loading of records in Oracle 8.1.6 using SQL*Loader

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|||

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: