SQL LOADER
POC done by Rajesh
SQL * loader is a utility program which is used to perform bulk loading into external files like CSV, TXT etc.
The raw data file is used for sql * loader
and that file is called flat file. The flat file is classified into 2 types:
1. Fixed
length file
2. Variable
length file
Fixed length file: A fixed-length file
(also known as a fixed-width file) is a type of flat file where each field of
data has a specific, pre-defined number of characters.
Variable length file: A Variable-length
file(often called a delimited file) is a type of flat file where characters are
separated by ‘,’.
The
Process:
Create
a text file and enter the data you want and save it with (.txt).
Open
sql developer and create a table with column names and no data in it.
In
general the table should be truncated or it should be new one for data import.
Now open command prompt as a
administrator
Enter the commands as in
the fig.1
Fig. 1
We get “control=” as output in that enter the
username and password as you given to sql developer credentials.
Before entering the path
inside the “control=” create a (.ctl)
file with syntax to load the data inside the table created in sql developer.
After creating the
control file now enter the path of the control file inside the output(“control=”)
Now the data will be
loaded into the table we created in sql developer and use sql command to
display the table.
The data will be inserted in the table
created.
No comments:
Post a Comment