?
Solved

Drop foreign key constraint

Posted on 2016-07-15
8
Medium Priority
?
69 Views
Last Modified: 2016-09-10
SQL ERROR: ORA-04021: timeout occurred while waiting to lock object.
0
Comment
Question by:lium1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
8 Comments
 
LVL 70

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 70

Accepted Solution

by:
Qlemo earned 2000 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 70

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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.
Via a live example, show how to take different types of Oracle backups using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

777 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