Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle table getting locked while updating a single record how ?

user8910003Aug 28 2016 — edited Aug 30 2016

I have the following piece of Oracle procedure where i do a update for table in a single row.

UPDATE
INVD_MAIN
SET STATUS_ID= 3,
EXTERNAL_ID_TYPE=9,ASSIGNED_ACCT_NO=0,STATE=1,STATE_DATE=SYSDATE,
ORDER_ID=11111,ORDER_ID_RESETS=0,AGING_STARTED_DATE=TRUNC(SYSDATE)
WHERE INVENTORY_ID = 5290074 
AND INVENTORY_ID_RESETS = 1

If i do not commit or roll back this update. I am not able to do another update on same table for any other record. I am using another session to do the following update

UPDATE
INVD_MAIN
SET STATUS_ID= 3,
EXTERNAL_ID_TYPE=9,ASSIGNED_ACCT_NO=0,STATE=1,STATE_DATE=SYSDATE,
ORDER_ID=11111,ORDER_ID_RESETS=0,AGING_STARTED_DATE=TRUNC(SYSDATE)
WHERE INVENTORY_ID = 5290074 
AND INVENTORY_ID_RESETS = 1

I get a table locked error. The error message is as follows:

ORA-00060: deadlock detected while waiting for resource

Why it is happening what is the solution.

any advice will be appreciated.

Thanks

Manoj

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 27 2016
Added on Aug 28 2016
12 comments
4,190 views