error loading DB2 table using ODBC stage

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
ds_infy
Premium Member
Premium Member
Posts: 59
Joined: Tue Jun 09, 2009 4:17 am
Location: India

error loading DB2 table using ODBC stage

Post by ds_infy »

Hi,

I have a requirement to update a Db2 table, i am using ODBC stage to perform this update, I need to handle rejects and so i am using ODBC stage to do it as this stage can capture the rejects,

When trying to update, the job fails with below error message

APT_CombinedOperatorController(2),0: Fatal Error: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for OS/390 and z/OS]FAILED EXECUTION DUE TO DEADLOCK/TIMEOUT. REASON 00C90088 TYPE 00000302. DBUYNG03.SBUYTTM .X'00006A'

I have validated that there are no duplicates(based on table's key columns)
in the input data which will get updated.

If the execution mode is changed to Sequential from Default(parallel), the job completes fine, Is there any reason for this issue?

There are no other jobs that are accessing the table which may result in a deadlock. Kindly help to understand the reason for the failure when executed job in Parallel mode.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How are you controlling the partitioning? Do an exact search here for "deadlock" to find many conversations on this subject.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

In parallel mode you may have default settings for the commit count, so you're stomping on your own foot...
Choose a job you love, and you will never have to work a day in your life. - Confucius
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Can you share the update statement that is being executed? You may have to modify your update statement...
Kandy
_________________
Try and Try again…You will succeed atlast!!
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

For e.g. you can't have the below update SQL in parallel mode.

Assume table X has 100000 records with COL2 value as ' yy'.

Code: Select all

UPDATE X set COL1= 'zz' where COL2 = 'yy'
This is a sample scenario where you face DEADLOCK.

To overcome this, pass the primary key as well to your UPDATE statement.

Code: Select all

UPDATE X set COL1 = 'zz' where COL2 = 'yy' and PRIMARYKEY = incomingPRIMARYKEY [i.e. :1 or orchestrate.primarykeyfieldname or :? etc]
Kandy
_________________
Try and Try again…You will succeed atlast!!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can if the data are partitioned on COL2.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply