7.1 SQL*Loader Features

SQL*Loader loads data from external files into Oracle Database tables.

SQL*Loader has a powerful data parsing engine that puts few limitations on the format of the data in the data file. You can use SQL*Loader to do the following:

  • Load data across a network, if your data files are on a different system than the database.
  • Load data from multiple data files during the same load session.
  • Load data into multiple tables during the same load session.
  • Load data from large tables using automatic parallel loading, for both direct path and conventional path loading, and for both single tables and sharded tables.
  • Specify the character set of the data.
  • Selectively load data (you can load records based on the records' values).
  • Manipulate the data before loading it, using SQL functions.
  • Generate unique sequential key values in specified columns.
  • Use the operating system's file system to access the data files.
  • Load data from disk, tape, or named pipe.
  • Generate sophisticated error reports, which greatly aid troubleshooting.
  • Load arbitrarily complex object-relational data.
  • Use secondary data files for loading Large Objects (LOBs) and collections.
  • Use conventional, direct path, or external table loads.

LOBs are used to hold large amounts of data inside Oracle Database. SQL*Loader and external tables use LOBFILEs. Data for a LOB can be very large, and not fit in line in a SQL*Loader data file. Also, if the file contains binary data, then it can’t be in line. Instead, the data file has the name of a file containing the data for the LOB field. In that case, SQL*Loader and the external table code open the LOBFILE, and load the contents into the LOB column for the current row. The data is then passed to the server, just as with data for any other column type.

JSON columns can be loaded using the same methods used to load scalars and LOBs

You can use SQL*Loader in two ways: with or without a control file. A control file controls the behavior of SQL*Loader and one or more data files used in the load. Using a control file gives you more control over the load operation, which might be desirable for more complicated load situations. But for simple loads, you can use SQL*Loader without specifying a control file; this is referred to as SQL*Loader express mode.

The output of SQL*Loader is an Oracle Database database (where the data is loaded), a log file, a bad file if there are rejected records, and potentially, a discard file.

The following figure shows an example of the flow of a typical SQL*Loader session that uses a control file.