Page 1 of 1

Job aborting in loading the data from seq file to db2

Posted: Wed Nov 28, 2007 9:16 pm
by ravij
Hi,

I am loading the data from Seq file to db2 database. I am using the stages in this job is like:

seqfile----->Transformer----->db2api

when I run the job, job got aborted and the error message is like:
SFI00PDetailTot02..trns_HostData: [IBM][CLI Driver][DB2/AIX64] SQL0803N One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "CTRLSTG.STG_HOST_TOT" from having duplicate rows for those columns. SQLSTATE=23505
please help me what could be the reason.
thanx in advance.

Posted: Wed Nov 28, 2007 9:37 pm
by ds_is_fun
On the DB2 end you have a primary key o n the column.

Re: Job aborting in loading the data from seq file to db2

Posted: Thu Nov 29, 2007 4:35 am
by baglasumit21
ravij wrote:Hi,

I am loading the data from Seq file to db2 database. I am using the stages in this job is like:

seqfile----->Transformer----->db2api

when I run the job, job got aborted and the error message is like:
SFI00PDetailTot02..trns_HostData: [IBM][CLI Driver][DB2/AIX64] SQL0803N One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "CTRLSTG.STG_HOST_TOT" from having duplicate rows for those columns. SQLSTATE=23505
please help me what could be the reason.
thanx in advance.
Thats because the sequential file have some duplicate rows for the key combination you have specified in the table. Please check the constraint in the table or change the Update action to "Insert New rows and Update Existing".

Posted: Thu Nov 29, 2007 4:45 am
by Sreedhar
Hi,

SQL0803N Primary Key constraint voilation.

Regards,