Sunday, December 13, 2009

Oracle SQL Loader

Oracle SQL Loader is a utility for loading data into an Oracle database and is often used for transporting data from a non-Oracle source system to an Oracle data warehouse. It is a versatile utility that can load data in almost any format, can load multiple files at the same time into multiple tables and can load data from files on disk, on tape or from a named pipe.It runs in one of 3 modes: conventional load, direct-path load and external-path load. The conventional load is the deafult method and has less restrictions (see below) than the direct-path load which is generally much faster but less flexible.
The direct-path load is faster for large data sets as it doesn't generate any undo data and bypasses the database
buffer cache but it is limited to use just on heap tables (see below for the other restrictions).
The external-path load creates an external table for the specified datafile and then executes SQL INSERT statements to load the data into the target table. This mode has 2 advantages over direct-path and conventional loads:
1.If a data file is big enough it will be loaded in parallel;
2.The source data can be modified by SQL and PL/SQL functions as it is being loaded.
SQL*loader enables you to:
•load data from multiple files (from disk, tape or named pipe) into one or more target tables in the same load
•load data in any character set supported by Oracle
•load or discard records depending on values in the input fields
•transform the data before loading using SQL functions
•generate unique sequential keys for specified columns
•append to existing data or replace existing data
•load large objects (lobs), collections (nested tables and varrays) and object-relational data

No comments:

Post a Comment