Locks on Row and Table in Oracle [message #434610] |
Wed, 09 December 2009 23:15  |
vikram1780
Messages: 222 Registered: January 2007 Location: Bangalore
|
Senior Member |
|
|
Hi,
I am encountered with dead lock error.
1. Updating different records of same table in different sessions will result in deadlock error?
2.While updating a record in session1 on rowlock is accquired or it places table level lock?
The below is scenario.
Emp table with different deptno's.
I am calling a procedure in session with deptno as parameter(ex:10). It queries the records of deptno from emp table. Update only those records.
Concurrently in other session the same function is called with difffernt deptno and it update records fo thos deptno.
While updating a row oracle places table lock or only places a rowlock. If it places a table lock then the deadlock error results.
In this case is it possible to partition the table based on deptno and do the same.Each partition is treated as different table or loakc is placed on complete table.
Request to give some idea on this.
Thanks in Advance
|
|
|
|
|