Tuesday, November 15, 2011

SQL Loader

SQL loader as some of you might have heard is a high performance data loader where it is used to load a large amount of data in no time in to SQL databases.This utility is provided by ORACLE and is one of the ORACLE DATABASE UTILITIES  along with other utilities such as Oracle Data Pump.
The data can be loaded from any text file and inserted in to the database. There are several types of files within the process of the SQL loader. There are three types of important files which are used prior to the process of SQL loader and those files are:
  • The DATA file
  • The CONTROL file
  • The parameter file
The  other files are used within the process of the Data being inserted in to the database.Those files are
  • The LOG file
  • The DISCARD file
  • The BAD file
The SQL loader reads a data file and a description of the data which is defined in the CONTROL file. Using this information and any added specified parameters , the SQL loader loads the data into the database.

 The Control File

The SQL Loader Control file contains information that describes how the data will be loaded. It contains the
  • Table name
  • Column Data types
  • Field Delimiters etc.
The Control file is the backbone of the whole process.
Manually creating a control file is an error prone process although when purchasing oracle, 
(i assume) the control file comes with it along with the sql loader utility. 
(That is why they call it ORACLE`s SQL loader utility.No point of creating a control file if you paid money to ORACLE).
The control file can also  specify that records are in a a fixed format. (A file is in fixed format when all records in a DATA file are of the same length).


Below is an image of the SQL loader Architecture










1 comment:

  1. But when user wants to create his own column order, it's very useful of creating a CONTROL FILE manually, Isn't it ?
    Anyway got some extra knowledge about SQl Loader.
    Very helpful post.

    ReplyDelete