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!

Locks and Unindexed Foreign Keys - oracle 12c

ChewyNov 8 2016 — edited Nov 8 2016

Hi Guys,

I can't seems to re-produce the issue as highlighted below in Oracle Doc.

Basically i created table1 with primary key and table2 with foreign key (with no index) referencing table1.

I tried to delete a row from table1 without commit in session 1. In session 2, i tried updating a row and the update go through successfully.

Anyone has specific example that can explain the below?

thanks

====

https://docs.oracle.com/database/121/CNCPT/consist.htm#CNCPT1351

Locks and Unindexed Foreign Keys

When both of the following conditions are true, the database acquires a full table lock on the child table:

No index exists on the foreign key column of the child table.

A session modifies a primary key in the parent table (for example, deletes a row or modifies primary key attributes) or merges rows into the parent table.

This post has been answered by JohnWatson2 on Nov 8 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 6 2016
Added on Nov 8 2016
4 comments
955 views