Solved

Drop foreign key constraint

Posted on 2016-07-15
8
45 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 69

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 69

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 69

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determine Who is Runnig my Bash Shell Script 4 80
Converting a row into a column 2 53
sort a spool into file output in oracle 1 29
Create table from select - oracle 6 40
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

772 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