DB2 Identity Column Issues with Parallel Jobs
Posted: Tue Aug 28, 2007 12:54 pm
Hi All,
I had a requirement in my current project to generate id's using identity column in the DB2 table, but I have given my recommendation to generate it from Data Stage and which works fine. Out of curiosity I tried populating the table with Identify column as I have never attempted that. But I am getting the following errors, so if anyone had attempted that would appreciate your help on this.
Here is the situation, I have my parallel job loading into the DB2 table from a sequential file using DB2 Enterprise stage. If I also have the identity column mapped in the job or default a zero it throws an error like this
EPC_Abc,0: Error Idx = 5;
DB2 Driver Embedded SQL message: SQL0798N A value cannot be specified for column "Abc_ID" which is defined as
GENERATED ALWAYS. SQLSTATE=428C9
;
sqlcode = -798;
sqlstate = 428C9
If I remove that identify column completely from the job, it throws an error like this,
main_program: Missing field: Abc_id in the input dataset.
EPC_Abc: When preparing operator: When binding partitioner interface: Could not find input field "Abc_id".
RCP is disabled and I tried using Write Method=Upsert and as well as Write.
Thanks in advance.
I had a requirement in my current project to generate id's using identity column in the DB2 table, but I have given my recommendation to generate it from Data Stage and which works fine. Out of curiosity I tried populating the table with Identify column as I have never attempted that. But I am getting the following errors, so if anyone had attempted that would appreciate your help on this.
Here is the situation, I have my parallel job loading into the DB2 table from a sequential file using DB2 Enterprise stage. If I also have the identity column mapped in the job or default a zero it throws an error like this
EPC_Abc,0: Error Idx = 5;
DB2 Driver Embedded SQL message: SQL0798N A value cannot be specified for column "Abc_ID" which is defined as
GENERATED ALWAYS. SQLSTATE=428C9
;
sqlcode = -798;
sqlstate = 428C9
If I remove that identify column completely from the job, it throws an error like this,
main_program: Missing field: Abc_id in the input dataset.
EPC_Abc: When preparing operator: When binding partitioner interface: Could not find input field "Abc_id".
RCP is disabled and I tried using Write Method=Upsert and as well as Write.
Thanks in advance.