Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

SQL*Loader Control File Tips

Oracle Database Tips by Donald BurlesonDon Burleson

The sqlldr Control File

The SQL*Loader control file contains information that describes how the data will be loaded. It contains the table name, column datatypes, field delimiters, etc. The SQL*Loader control file simply provides the guts for all SQL*Loader processing.

Manually creating SQL*Loader control files is an error-prone process. The following SQL script can be used to generate an accurate SQL*Loader control file for a given table. The script accepts a table name and a date format (to be used for date columns), and generates a valid control file to use with SQL*Loader for that table.

Once executed and given a table name and date format, the script below will generate a control file with the SQL*Loader control file contents:

See code download for script

The SQL*Loader control file can also specify that records are in fixed format. A file is in fixed record format when all records in a datafile are the same length. The SQL*Loader control file specifies the specific starting and ending byte location of each field. This format is harder to create and less flexible but can yield performance benefits. A SQL*Loader control file specifying a fixed format for the same table could look like the following:

LOAD DATA

INFILE 'table_with_one_million_rows.dat'
INTO TABLE TABLE_WITH_ONE_MILLION_ROWS
(
COL1 POSITION(1:4) INTEGER EXTERNAL
, COL2 POSITION(6:9) INTEGER EXTERNAL
, COL3 POSITION(11:46) CHAR
, col4 position(48:83) CHAR
, col5 position(85:120) CHAR
, COL6 POSITION(122:130) DATE "MMDDYYYY"
)

Also see my notes on the SQL*Loader bad file and discard file

See these related notes on SQL*Loader:

 

 
 
 
Get the Complete
Oracle Utility Information 

The landmark book "Advanced Oracle Utilities The Definitive Reference"  contains over 600 pages of filled with valuable information on Oracle's secret utilities. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.
 


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.