Error during loading rows in DB2 database
Posted: Fri Sep 26, 2008 2:12 pm
Hello,
I am trying to load a file with 6000 records in DB2. The job loads 48 rows out of 6000 and throws the following warning for remaining :
[IBM][CLI Driver][DB2] 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 "" constrains table "" from having duplicate rows for those columns. SQLSTATE=23505
If I re-run the same file, again 48 rows are loaded making the total count as 96, so I am sure it is not duplicate records thats causing the issue because the same records are being loaded again.
I checked there are no foreign keys defined for this table, so referential intergrity cant be the reason.
Please advise.
Also, I want to rollback in case even one of the rows is rejected. I have set the transaction size as 0, still I see 48 rows loaded in the DB and warnings for the rest. Please let me know if I need to do anything extra.
Thanks in advance !
I am trying to load a file with 6000 records in DB2. The job loads 48 rows out of 6000 and throws the following warning for remaining :
[IBM][CLI Driver][DB2] 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 "" constrains table "" from having duplicate rows for those columns. SQLSTATE=23505
If I re-run the same file, again 48 rows are loaded making the total count as 96, so I am sure it is not duplicate records thats causing the issue because the same records are being loaded again.
I checked there are no foreign keys defined for this table, so referential intergrity cant be the reason.
Please advise.
Also, I want to rollback in case even one of the rows is rejected. I have set the transaction size as 0, still I see 48 rows loaded in the DB and warnings for the rest. Please let me know if I need to do anything extra.
Thanks in advance !