SQL*Loader   «Prev 

Discarded and Rejected Records

Records read from the input file might not be inserted into the database. Such records are placed in either a bad file or a discard file.

The Bad File

The bad file contains records that were rejected, either by SQL*Loader or by the Oracle database.
If you do not specify a bad file and there are rejected records, then SQL*Loader automatically creates one. It will have the same name as the data file,cwith a .bad extension. Some of the possible reasons for rejection are discussed in thecnext sections.

Records Rejected by SQL*Loader

Data file records are rejected by SQL*Loader when the input format is invalid. For example, if the second enclosure delimiter is missing, or if a delimited field exceeds its maximum length, then SQL*Loader rejects the record. Rejected records are placed in the bad file.

Records Rejected by Oracle Database During a SQL*Loader Operation

After a data file record is accepted for processing by SQL*Loader, it is sent to the database for insertion into a table as a row. If the database determines that the row is valid, then the row is inserted into the table. If the row is determined to be invalid, then the record is rejected and SQL*Loader puts it in the bad file. The row may be invalid, for example, because a key is not unique, because a required field is null, or because the field contains invalid data for the Oracle data type.

SQL*Loader New Features

Load data directly into large objects. You can load individual data files into LOB columns in the database. The data files can be images, documents, or any other kind of data, up to the 4GB maximum size for a LOB column.

Load data into Oracle objects and collections. The control file can specify how to load data into a collection or object data types such as a REF data type.

Use (API) Application Programmer Interface to access SQL*Loader. You can create a customized application that reads in data and uses the SQL*Loader engine to load the data into the databse. No control file is used.