Tuesday, June 4, 2013

SQL Loader program in Shell Script

  1. Check the control file is present
  2. Check the data file present
  3. Check the data file size is zero or not
  4. Put dos2unix <filename> is used to remove newline character and control character , this is optional
  5. Load the data into custom table using sql loader
Syntax :
sqlldr “db_user/db_passwd” control="controlfile path".ctl log="logfilepath".log bad="badfile path".bad  data="data file path“
Example :

sqlldr ${FCP_LOGIN} control="controlfile.ctl" log="logfile.log" bad="badfile.bad"  data="datafile“

Note : bad file is created only data file having invalid data content

No comments:

Post a Comment

Price List Query for Item

 SELECT qph.list_header_id,        qph.name,        qph.description,        qphh.start_date_active,        qphh.currency_code,        q...