SQL*Loader bad file

From: Joyce A Moore <jm5h+_at_andrew.cmu.edu>
Date: Thu, 18 Nov 1999 15:55:05 -0500
Message-ID: <gsB6Sdu00UiB063ks0_at_andrew.cmu.edu>



[Quoted] I'm finding that sqlldr sometimes can't write bad records to the bad file and errors off with a message in the log file something like:

SQL*Loader-523 error: -2 writing to file (bad file name)

The bad file always gets created, but the rejected records aren't always added.

This isn't a simple sqlldr process. Two tables are involved using "when", a uniqueness constraint on the header table, foreign keys in the detail referring to the header, triggers on both of them, and calls to an Oracle Project Accounting (with the Grants Management System patch) validation routine from the trigger. In short, there are many ways for a record to fail.

Simple format errors usually end up in the bad file and allow the log to finish. If the header fails for any reason, it will end up in the bad file and the log file finishes. By "finish", I mean it doesn't print the above error and abort. If a foreign key or a trigger error occurs, the error message ends the log file. Maybe this is unnecessary information, but since the nature of the error is the only variable, I thought I'd include it.

Any help is really appreciated.

Joyce Moore



Administrative Computing and Information Services Carnegie Mellon University Received on Thu Nov 18 1999 - 21:55:05 CET

Original text of this message