• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 87
  • Last Modified:

Drop foreign key constraint

SQL ERROR: ORA-04021: timeout occurred while waiting to lock object.
0
lium1
Asked:
lium1
  • 3
1 Solution
 
QlemoC++ DeveloperCommented:
The corresponding table could not be locked within the time allowed.
0
 
lium1Author Commented:
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
 
QlemoC++ DeveloperCommented:
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
 
QlemoC++ DeveloperCommented:
"You can't do that" can be a valid and appropriate answer. If there is no way, there is none.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now