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

Oracle EBS R12 – Query to View Consolidated Invoice Details with Individual Transactions

SELECT     hp.party_name                  AS customer_name,     aca.account_number             AS customer_account,     hci.cons_billing_num...