Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

cannot disable constraint (INF_PK) - dependencies exist

Shadow123Nov 29 2016 — edited Nov 29 2016

Hi Guys

Need your help , I need to insert huge amount of data into multiple tables so I have a plan to disable constraint and trigger first before inserting and then after insert need to enable .

During the process of disable constraint , I got the following error:

Error

SQL Error: ORA-02297: cannot disable constraint (INF_PK) - dependencies exist
02297. 00000 - "cannot disable constraint (%s.%s) - dependencies exist"
*Cause:    an alter table disable constraint failed becuase the table has
           foriegn keys that are dpendent on this constraint.
*Action:   Either disable the foreign key constraints or use disable cascade

I know there are dependencies around 30s table for this column as a foreign key so it means that I have to disable constraint for all those 30 tables, my question is that is there any way that I can use to disable all 30 tables constraint without changing any data and 1 single command

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 27 2016
Added on Nov 29 2016
4 comments
11,646 views