Job hungs up when trying to update 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
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Job hungs up when trying to update table

Post by sarathchandrakt »

Hi,

I am copying,
ID(Primary KEY),
EMP_ID,
NAME,
ADDRESS
from Table EMP to a DATASET.

Then I am doing a lookup on DATASET from a different file with columns EMP_ID,NAME,ADDRESS. When ever the EMP_ID matches, I am sending ID,NAME,ADDRESS to an Oracle Connector and trying to update NAME and ADDRESS based on ID in EMP_ID table. But the table hungs up when ever I do this.

I tried running it Sequential and by Partioning data. It doesn't work either.

I copied this data to a temp table and tried to update EMP_ID by using MERGE query. It worked. I am curious why the UPDATE query is not working.

(My DBA says, the table is going into locked stage when ever I run the Job. And many sessions are open on that table. We tried deleting all sessions and blocks. Still the same. None else is accessing the table except me)
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

I would look to your DBA for more assistance.

Is the other table actually a view and the underlying table currently has a lock on it?

I basically sounds like a table lock issue and nothing on the datastage side.
taylor.hermann
Premium Member
Premium Member
Posts: 32
Joined: Wed Aug 20, 2014 11:17 am

Post by taylor.hermann »

We had a similar locking problem, because of how the partitioning worked with a job we had.
But we ran out of processes on the Oracle server, and when our DBA increased that much higher, everything worked fine.
AshishDevassy
Participant
Posts: 32
Joined: Fri Nov 07, 2014 11:18 am

Post by AshishDevassy »

few things i would check are .
1. Are there duplicates coming from the source links. If so remove / manage them.
2. Work with DBA to identify the active query that is in execution when the job hangs.
3. Check the partitions of the job. i.e. test by running on a single node to see if that works.
4. My guess is since the table locked up , there might be multiple DML operations on that table at the same time.
that's wierd ?
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

This is what I did,

Created Index on Column which I was using to update the table in where clause.

It fixed the issue.

Thanks for the suggestions though.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So not hung up or 'locked' but rather just... slow. From the full table scan each update had to perform.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply