Page 1 of 1

WARNING: as primary key violated

Posted: Sun Aug 10, 2008 11:59 pm
by pxraja
Hi all,

I am using ODBC_src-->TRF-->ODBC_trg, ODBC_trg has composite primary keys while I am running this job my job runs successfully, but i am getting 2000+ warnings... like

JobName..Trf.Lnk_: DSD.BCIPut call to SQLExecute failed.
SQL statement: INSERT INTO TABLE NAME(FIELDNAME) VALUES (?,?,?,?,?,?,?,?,?,?)
SQLSTATE=23000, DBMS.CODE=1
[DataStage][SQL Client][ODBC][DataDirect][ODBC Oracle Wire Protocol driver][Oracle]ORA-00001: unique constraint (RELODS.CDA_MASTER_PK) violated

but when I added a sequential without mentioning any key columns and constraint as REJECTED.

the job runs without any warnings! no rows were rejected to sequential file

Though the job run's successfully! I want to understand this behaviour

Any clarifications are welcomed

Thanks in advance

Posted: Mon Aug 11, 2008 12:01 am
by ray.wurlod
If a table has no primary key you can insert the same row as many times as you wish. There is nothing to enforce uniqueness.

Posted: Mon Aug 11, 2008 12:03 am
by pxraja
Also I am having only one constraint (i.e., REJECTED)

Posted: Mon Aug 11, 2008 12:07 am
by pxraja
Hi ray,

I think I misled you

actually, I need the clarifications like, why the warnings are not coming when I am using another sequential file while having the constraint(rejected)? whereas no rows were rejected to sequential file.

Posted: Mon Aug 11, 2008 1:47 am
by ray.wurlod
If you're writing to a sequential file there's no notion of a key - you just write a line at a time. The only time REJECTED would be triggered is if you couldn't write to the file at all, for example disk full, quota exceeded, file size limit reached, no write permission.

Posted: Mon Aug 11, 2008 11:34 pm
by pxraja
thanks ray

for your guidance