We have to write a SQL Loader control file describing the input file, loading options, column structure and other settings.
The SQL*Loader control file is a text file that contains data definition language (DDL) instructions. DDL is used to control the following aspects of a SQL*Loader session:
For more detailed information please visit SQL Loader Control file reference
Open Visual Editor in Linux command prompt by typing vi and type the following script
LOAD DATA
INFILE
'/opt/oracle/customers.txt'
BADFILE '/opt/oracle/customers.bad'
DISCARDFILE '/opt/oracle/customers.dsc'
APPEND INTO TABLE
SCOTT.customers
FIELDS TERMINATED BY '\t' TRAILING NULLCOLS
(CustomerID,
CompanyName, ContactName,
ContactTitle, Address,
City, Region, PostalCode,
Country, Phone, Fax)
Here is the explanation of different commands In the above script:
After writing the above contents save the file and quit vi by pressing ESC and then :wq
Next, run SQL Loader command
Interface Computers Academy © 2007-2017 All Rights Reserved