Sunday, October 21, 2012

SQL Loader Steps

SQL Loader Utility of Oracle is a way to insert/append all outside data like CSV records to put into the Oracle table. This utility is invoked from Dos window.
 
Below is the Steps to perform the insert into oracle tables by SQL Loader
 
1) First create the CSV file by using excel sheet. Save the excel file as CSV file.
2) Keep that CSV file in the following path :- C:\DATA
3) Create the Control file for this load like below [sample one]
LOAD DATA
INFILE 'c:\data\Distinct_KEY.csv'
BADFILE 'Distinct_KEY.bad'
APPEND
INTO TABLE DISTINCT_KEY
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(
KEYNUMBER,
FLAG
)
4) Go to the command prompt at the following path :- C:\DATA
5) Run the below command and then wait and watch JJ
 
sqlldr USER_ID/PASSWORD@INSTANCE c:\data\Distinct_KEY errors=300000
 
 
Rohit...

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home