Job aborting in loading the data from seq file to db2

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ravij
Premium Member
Premium Member
Posts: 170
Joined: Mon Oct 10, 2005 7:04 am
Location: India

Job aborting in loading the data from seq file to db2

Post 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.
Ravi
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

Post by ds_is_fun »

On the DB2 end you have a primary key o n the column.
Those who throw objects at crocodiles should be asked to retreive 'em.
baglasumit21
Participant
Posts: 132
Joined: Wed Mar 01, 2006 11:12 pm
Location: Pune

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

Post 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".
SMB
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post by Sreedhar »

Hi,

SQL0803N Primary Key constraint voilation.

Regards,
Regards,
Shree
785-816-0728
Post Reply