Lock data Rows in 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
Nagac
Premium Member
Premium Member
Posts: 127
Joined: Tue Mar 29, 2011 11:39 am
Location: India

Lock data Rows in table

Post by Nagac »

Hi

I have requirement to extract data from table(which is common to many processes) and update the same table But in the mean time no other process should read the same data and update. We are doing this in single Job.

Could some one advise on this how to achieve this?

Thanks
Naga
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Research "transaction isolation level".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nagac
Premium Member
Premium Member
Posts: 127
Joined: Tue Mar 29, 2011 11:39 am
Location: India

Post by Nagac »

ray.wurlod wrote:Research "transaction isolation level".
Thanks Ray,

I had gone through the docs and found Repeatable Read Isolation level. And have few queries on this.

As it says, It locks the row(whichever has been read) does it allows to update the in the same process( i mean reading as reference and updating in same process)
And cannot be read the same row by any other process? but same row can be read n no.or times by same process?
deeplind07
Participant
Posts: 31
Joined: Mon Jun 28, 2010 5:15 am
Location: pune

Re: Lock data Rows in table

Post by deeplind07 »

As it says, It locks the row(whichever has been read) does it allows to update the in the same process( i mean reading as reference and updating in same process)
Yes , it allows the first process to update the rows
And cannot be read the same row by any other process? but same row can be read n no.or times by same process
No, all pocesses will be able to read the row, they will not be able to update the row.

In addition to this,there can be new records added by the any other process as well
Post Reply