Posts Tagged ‘SQL*Loader’

Oracle SQL*Loader 1 – Introduction

SQL*Loader is an Oracle-supplied utility that allows you to load data from a flat file into one or more database tables.

The basis for almost everything you do with SQL*Loader is a file known as the control file. The SQL*Loader control file is a text file into which you place a description of the data to be loaded. You also use the control file to tell SQL*Loader which database tables and columns should receive the data that you are loading.

Once you have a data file to load and a control file describing the data contained in that data file, you are ready to begin the load process. You do this by invoking the SQL*Loader executable and pointing it to the control file that you have written. SQL*Loader reads the control file to get a description of the data to be loaded. Then it reads the input file and loads the input data into the database.

The SQL*Loader Control File

The SQL*Loader control file is the key to any load process. The control file provides the following information to SQL*Loader:

  •     The name and location of the input data file
  •     The format of the records in the input data file
  •     The name of the table or tables to be loaded
  •     The correspondence between the fields in the input record and the columns in the database tables being loaded
  •     Selection criteria defining which records from the input file contain data to be inserted into the destination database tables.
  •     The names and locations of the bad file and the discard file

Read more »