Jul 2, 2007 12:09 PM
nzload and maxerrors option
-
Like (0)
Just a word or warning, 'cos we've fell foul of something that's caused us to lose data !
We've been happilly loading data using nzload with the maxerrors options set to 0, believing this meant that nzload should fail if any errors were encountered.
However with maxerrors set to 0 nzload is indicating a successful load (i.e. no error messages or nonzero exit codes from nzload) even if records have failed to load successfully, in our case because the input data for a column was larger than the column size in the table being loaded.
In fairness, the documentation does not indicate that 0 is a valid value, but I have raised an incident with support to request that nzload should not accept the value 0 if it is not valid, or it should treat 0 the same as 1, where 1 is documented as causing nzload to fail if at least 1 error is encountered.
I believe that treating 0 as allowing errors is very dangerous, since in our case it caused us to inadvertantly lose data.
I just wanted to post this here to make everyone else aware to make sure you don't make the same mistake as us
Update to this issue, it appears that the nzload with maxerrors 0 generates an exit code of 2 when it fails to load records, if the nzload is run on our NPS linux host, but gives an exit code of 0 if we run it from a remote AIX client.
So it maybe an issue with the AIX client tools. Will update further as support diagnose the problem.
Looks to be a problem specific to the 64 bit AIX client tools, now waiting for a fix from engineering. So if you're not running these you're in the clear ![]()
We load data with max_error set to 0. No issues to date.
However, we are running nzload from a mapped nfs share, so basically through the NPS host system.
Just FYI, NFS shares are not a problem.
Yep, nzload on the NPS linux host itself produces the correct results, i.e. with maxerrors 0 it gives an exit code of 2 if errors are encountered.
Support have confirmed this is fixed in 3.2, which is in beta at the moment, we have recoded our loads to use maxerrors 1 as a workaround for now, to ensure we catch all errors.
Thanks for the info!
Yes, I too have been using nzload with the -maxErrors option set to 0 and there is a considerable loss of data since it becomes resilient to errors.
If there is any historical data then this option should be avoided or if the data to be loaded is going to be similar then probably the log file should be studied and these bad records should be analysed and the query thus modified.
Regards,
Saket Kale

