Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8834849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:07:17+00:00 2026-06-14T09:07:17+00:00

I have Oracle Database 11g Enterprise Edition Release 11.2.0.1.0. I have parent table t1

  • 0

I have Oracle Database 11g Enterprise Edition Release 11.2.0.1.0.
I have parent table t1 and t2 with foreign key which references t1(col1).
What I’m wondering is why locking is there?
Please check what I’ve done…

session 1

SQL> create table t1(col1 char(1), primary key(col1));
Table created.

SQL> insert into t1 values('1');
1 row created.
SQL> insert into t1 values('2');
1 row created.
SQL> insert into t1 values('3');
1 row created.
SQL> insert into t1 values('4');
1 row created.
SQL> insert into t1 values('5');
1 row created.

SQL> commit;
Commit complete.


SQL> create table t2(col1 char(1), col2 char(2), foreign key(col1) references t1(col1));
Table created.

SQL> insert into t2 values('1','0');
1 row created.
SQL> commit;
Commit complete.

SQL> update t2 set col2='9';   --not committed yet!
1 row updated.

session 2

SQL> delete from t1;    -- Lock happens here!!!

session 1

SQL> commit;
Commit complete.        

session 2

delete from t1          -- The error occurs after I commit updating query in session 1.
*
ERROR at line 1:
ORA-02292: integrity constraint (KMS_USER.SYS_C0013643) violated - child record found

Could anyone explain me why this happens?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:07:18+00:00Added an answer on June 14, 2026 at 9:07 am

    delete from t1; tries to lock the child table, T2. If the session is waiting on the entire table lock it can’t even try to delete anything yet.

    This unusual locking behavior occurs because you have an unindexed foreign key.

    If you create an index, create index t2_idx on t2(col1);, you will get the ORA-02292 error instead of the lock.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a table already existing in oracle 11g database which allows read as
We have a Oracle 9i database and OrderDetails table which has a column to
I have installed Oracle Database 11g Express Edition on my pc (windows 7) and
We have an Oracle 11g database table with around 35 million rows. We are
I have looked through the whole set of Oracle Database 11g Release 2 (11.2)
In Oracle Database 10g and Oracle Database Express Edition 11g I have encountered some
I have an oracle 10g database that has 2 tables: a REBATES table, and
we have written a C# 3.5 client talking to an Oracle database (11g) using
Have some dates in my local Oracle 11g database that are in this format:
I am connecting C# with Oracle 11g. I have a DataTable which i fill

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.