title: How to Log SQL Loader Error in database table
body: <p>I have a control file using which I will loading some data into a table following is the  control file</p>
  
  <pre><code>    LOAD DATA
  INFILE  'D:\prova2new.txt'
  BADFILE 'D:\Prova6.bad'
  discardmax 1
  TRUNCATE
  INTO TABLE tact_gfp_customers_ba_bck
  FIELDS TERMINATED BY '|' 
  TRAILING NULLCOLS
  (CID  CHAR NULLIF CID=BLANKS,
  CUSTOMER_NAME CHAR NULLIF CUSTOMER_NAME=BLANKS,
  ARBOR_BA CHAR NULLIF ARBOR_BA=BLANKS,
  PROXY_NUMBER CHAR NULLIF PROXY_NUMBER=BLANKS,
  DD_STATUS CHAR NULLIF DD_STATUS=BLANKS,
  DDS_DATE DATE NULLIF DDS_DATE=BLANKS,
  PRIMARY_FLAG_BANK CHAR NULLIF PRIMARY_FLAG_BANK=BLANKS,
  LAST_UPD_DATE DATE NULLIF LAST_UPD_DATE=BLANKS, 
  BRANCH_NUMBER CHAR NULLIF BRANCH_NUMBER=BLANKS,
  BANK_NUMBER CHAR NULLIF BANK_NUMBER=BLANKS,
  ACCOUNT_NUMBER CHAR NULLIF ACCOUNT_NUMBER =BLANKS,
  ACCOUNT_NAME CHAR NULLIF ACCOUNT_NAME =BLANKS,
  IBAN  CHAR NULLIF IBAN=BLANKS,
  ACCOUNT_HOLDER  CHAR NULLIF ACCOUNT_HOLDER =BLANKS,
  ACCOUNT_SIGNER  CHAR NULLIF ACCOUNT_SIGNER =BLANKS,
  HOLDER_REG_NO CHAR NULLIF HOLDER_REG_NO = BLANKS,
  SIGNER_FISCAL_CODE CHAR NULLIF SIGNER_FISCAL_CODE=BLANKS
  )
  </code></pre>
  
  <p>Using the below command I am using this control file to load data</p>
  
  <pre><code>sqlldr userid=COMP/COMP99@dw12_cind_np control=D:\V_CUSTOMERS_BA.ctl , log=D:\ErrorInsert.log
  </code></pre>
  
  <p>Now the problem is I am running this SqlLoader command using a batch file in a seperate server which I don't have any access to. To see the error log everytime I have to request the Server Support Team to provide me the latest log. I want to make this process easier by logging aby SQL Error that the SQL Loader will encounter in my Database table. So that I could check the error by a simple select. </p>
  
  <p>How can I insert the SQL Loader Error log into a DB table?</p>