Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DB2 :: RE: SQL Merge error -254

$
0
0
Author: Rohit Umarjikar
Posted: Thu Jun 02, 2016 1:19 am (GMT 5.5)

Look for Get Diagnostics.
Code:
SQLCA and GET DIAGNOSTICS considerations:
The GET DIAGNOSTICS statement can be used immediately after the MERGE statement to check which input rows fail during the merge operation. The GET DIAGNOSTICS statement information item, NUMBER, indicates the number of conditions that are raised. The GET DIAGNOSTICS condition information item, DB2_ROW_NUMBER, indicates the input source rows that cause an error.
or here
So you need really DB2_ROW_NUMBER to know the last successful row and in your case it is zero means none got processed and that means either the first row is bad one or something wrong with the table which is the case now.
You told us everything went good for last 3 days and on 4th daya you started getting this issue means mostly the row is not good unless what you found is true. in future DBA's are the first POC's in such cases as we can't look inside what went wrong from database side.
_________________
Regards,
Rohit Umarjikar
"Some things Man was never meant to know. For everything else, there's Google"


Viewing all articles
Browse latest Browse all 9405

Trending Articles