Page 1 of 1

DB2 SQL error -254

Posted: Tue Mar 04, 2014 5:23 pm
by CA4T
DB2 Error -254 = A NON-ATOMIC statement STATEMENT ATTEMPTED TO PROCESS MULTIPLE ROWS OF DATA, BUT ERRORS OCCURRED

I have a parallel job with 2 (DB2) Connectors and a reject link going to a sequential file.

In the first connector I am selecting off the data I want to extract from the source table. In the second connector I am doing an Insert of that data to the target table. Any rejects should be written to the file.

So, my problem is when I execute the job I get all of my inserts rejected and the DB2 error that gets thrown is a -254. It doesn't really tell me my true DB2 issue. I had to modify the input so I only had 1 row and run it and found out my DB2 issue was -530 or forign key issue.

Is there any tricks out there to get the true DB2 error codes to go to the log?

Posted: Tue Mar 04, 2014 8:00 pm
by ray.wurlod
Try setting Array Size and Transaction Size to 1, at least while troubleshooting. Like every other property in Connector stage types, these can be made job parameters.

Posted: Wed Mar 05, 2014 2:18 pm
by CA4T
That did work but impacted performance. Any other thoughts?

Posted: Wed Mar 05, 2014 3:50 pm
by ray.wurlod
I answered the question "Is there any tricks out there to get the true DB2 error codes to go to the log?"

I don't know any other "tricks" to achieve this result. I prefer to prevent error codes. Once you've figured out what the errors are you can fix the cause(s), then revert your array and transaction sizes to production settings.