Search This Blog

Showing posts with label sqlldr. Show all posts
Showing posts with label sqlldr. Show all posts

Monday, July 14, 2014

Sql Loader Data Load in Unix



When we deal with unix oracle environment, importing a file to db table by sql loader is always effective.

Basic flow is ...


read File->sqlldr takes reference of cntrl file->table description check->validate->load line by line

Below is the syntax to work with...

sqlldr username/password control=ctrl_file_name log=logfile

In case default credentials are set through cfg file, username and password can be ignored.

sample cntrl file

OPTIONS (DIRECT=TRUE)
         LOAD DATA
         INFILE sample.log
         --
         INSERT
         INTO TABLE sample
         --
         (sample_col1
         ,sample_col2
,sample_col3
         )