Solved

Drop foreign key constraint

Posted on 2016-07-15
8
34 Views
Last Modified: 2016-09-10
SQL ERROR: ORA-04021: timeout occurred while waiting to lock object.
0
Comment
Question by:lium1
  • 3
8 Comments
 
LVL 68

Expert Comment

by:Qlemo
ID: 41712665
The corresponding table could not be locked within the time allowed.
0
 

Author Comment

by:lium1
ID: 41712683
I meant how to solve this issue. I am trying to add constraint foreign_key with enable and validate where I got an timeout error.
0
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points (awarded by participants)
ID: 41712693
Since you want to have the FK validated, it needs to go thru both this and the referred table to check the constraint. You won't get that to succeed for heavy used tables (when updating/inserting a lot).
Not requesting validation is one option. Better to check manually later for mismatches - you'll have to correct them anyway, and it is better to have the FK ensured for future changes than not at all.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 41778545
"You can't do that" can be a valid and appropriate answer. If there is no way, there is none.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now