DB2 Connector - Issue in updating the table

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sridinesh2009
Participant
Posts: 14
Joined: Wed Nov 11, 2009 4:52 am
Location: New York

DB2 Connector - Issue in updating the table

Post by sridinesh2009 »

Experts,

We are migrating jobs from v7.5 to v9.1.

Job Design in v7.5
---------------------
update Dataset ---> Transformer ----> DB2 PX Stage

Job Design in v9.1
---------------------
update Dataset ---> Transformer ----> DB2 connector Stage
(we updraged the DB2 stage to Connector in v9.1)

Update Statement:
UPDATE SCHEMA.TABLE_NAME SET END_TP=?,UPDT_TP=? WHERE CASE_NUM=? AND END_TP='9999-12-31-23.59.59.999999';

the job is running fine in v7.5 and the job is failing in v9.1 due to the below error.. both the version jobs are pointing to same db2 database. (we are taking backup and restoring original backup evertime we run the jobs from v7.5 and v9.1)..

Fatal Error: Fineos_Clm_Taskupd,5: SQLExecute reported: SQLSTATE = 40506: Native Error Code = -1,476: Msg = [IBM][CLI Driver][DB2/AIX64] SQL1476N The current transaction was rolled back because of error "-911". SQLSTATE=40506
(CC_DB2DBStatement::processRowStatusArrayUserSQL, file CC_DB2DBStatement.cpp, line 3,451)


i researched online and found this is due to the current update SQL query waiting for the previous update SQL query for long time for locking the table for the update.. and since it is waiting for long time and reaches the timeout limit.. the DS v9.1 job is failing.

the columns used in WHERE clause is not a index column.. so we added INDEX for those columns and ran the job.. it worked.

tried with Hash partioning on the key column / switched off auto commit..tried to run it in sequential mode.. nothing is working..and we are in a situation were we cannot add INDEX to this table in any higher environemnt(qa, production..).. so is there another solution for fixing this problem ?
Dinesh.D
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Re: DB2 Connector - Issue in updating the table

Post by MT »

Hi sridinesh2009,

first I wonder that your statement still works as the DB2 Connector usually wants ORCHESTRATE.column-name instead of "?".

I have recommended to an create index for these situations a lot of times and I have no idea why this should not be possible - maybe not for you personally but for a DBA...
Running the DB2 Connector in sequential mode would be the other (suboptimal) thing I would try but you said it is not working...
regards

Michael
Post Reply