data load using sql loader giving bad records but oracle job succeeding. I want to fail the job if it creates even a single record rejects and creates bad file. Please help me with this.
0
votes
1 Answers
0
votes
SQL*Loader, by default, allows 50 errors before it will cause the loader job to fail:
https://docs.oracle.com/cd/B19306_01/server.102/b14215/ldr_params.htm
errors -- number of errors to allow (Default 50)
Within your control file or on the command line when you call SQL*Loader, if you change the errors parameter, you can alter this to whatever you want -- in your case, it sounds like you want zero.
Here is an example:
$SQLDIR/sqlldr /@server.whatevz.com \
control=/apps/loader/table1.ctl \
log=/apps/loader/table1.log \
bad=/apps/loader/table1.err \
rows=200000 \
errors=0
dba_jobsjob? Adbms_schedulerjob? A cron job running at the operating system level? Something else? Perhaps you just want to specifyerrors=0in your command line. - Justin Cave