Page 1 of 1

Lock data Rows in table

Posted: Tue Oct 18, 2011 3:27 pm
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

Posted: Tue Oct 18, 2011 4:13 pm
by ray.wurlod
Research "transaction isolation level".

Posted: Fri Oct 21, 2011 3:48 pm
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?

Re: Lock data Rows in table

Posted: Sun Oct 23, 2011 10:08 pm
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