Thursday, December 01, 2005

SQL LOADER --Commonly Asked Questions And Answers

I use the Oracle`s SQLLDR utility usually.I faced many problems.I solved them finding solution from my teammates and other

places.I also feel many points to be noted down.So all the question here are on SQLLDR.Hope this post length will increase

further later.


Q1> Can we upload data to some remote machine db?
Ans. Yes.U just need to supply the appropriate dblink.
like as
c:\>sqlldr /@dblink control= data=

Q2>So wats the difference between sqlldr and ftp as both can load files to some remote machine?
Ans.Its an absurd question.Bcz ftp just upload a file.But sql loader inserts it into table not upload the file.and sql loader

can do much which we will discuss later on.

Q3>can u give a simple format for sqlloader control file?
Ans. Control file is the heart of the whole loading process.

example1.

Load data -- command
infile * -- to which table
replace -- replace the prev records
fields TERMINATED BY '|' -- Fields in the input file are separated by pipe
OPTIONALLY ENCLOSED BY '"'
-- if fields are optionally enclosed by double quote
TRAILING NULLCOLS --use this if u expect any column to be null
(
column_name_where_1st_data_2b_loaded,
column_name_where_2nd_data_2b_loaded, --here all are the actual column names in the target table.
column_name_where_3rd_data_2b_loaded,
column_name_where_4th_data_2b_loaded
)

Q4> What trainling nullcols do actually?Ans. It justs load a NULL if any data is missing.

Q5>How much faster is ftp than sqlloader?

Labels:

0 Comments:

Post a Comment

<< Home