Table lock and 'un index foreign key constraint’ related issues on oracle 11g

I wonder what it mean by below issue based on the oracle 11g database report
Table lock on aaa _bbb table  ‘un index foreign key constraint’ related issues. It forced to restart all production jvms and close the database connections and restablish them which blocked all the production users for couple of hours. Why table lock happens. what are root causes to debug and how to avoid them our application written mainly on java j2ee using other technologies as well
Please advise.
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sdstuberCommented:
Root cause:

If you try to modify the parent record, it will lock the child tables while it enforces/validates the constraint.

If you have an index on the constrained columns of the child table, then only the affected rows will be locked.

Fix:

Create an index on the child table's constrained columns
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gudii9Author Commented:
Does re ordering or mismatch or dropping the indexes has any impact which could have caused the issue? please advise
0
sdstuberCommented:
dropping the indexes would definitely cause it
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.