Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> Disable Foreign Key Constraint Problems
ishan
post May 10 2017, 02:37 AM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 10-May 17
Member No.: 51,971



Hi. I Have 2 database tables. One called AD_USER and the other called AD_CHANGELOG. The table AD_CHANGELOG has a foreign key constraint AD_USER_ID which is a primary key of the AD_USER table. To delete some records from AD_USER table I disabled the foreign key constraint with the following statement :
alter table
AD_CHANGELOG
disable constraint
FK580_8812;

It did disable the constraint and I was able to delete the rows in AD_USER table. But after that, I found that my oracle DB every night for the last 2 days starting from 8 pm onwards starts running a
ALTER TABLE AD_CHANGELOG statement which takes up lot of cpu time and hangs the websites which I am running. I then manually have to kill the session that runs this sql and then things are normal again. I do not understand what to do. Should I try to run a alter statement to enable the constraint that I had disabled. I am really worried. I think oracle runs the DBA_ReCompile process every night and thats when this alter statement is run again I guess.

If anybody could throw some light. Thanks
Go to the top of the page
 
+Quote Post
burleson
post May 14 2017, 04:22 PM
Post #2


Advanced Member
***

Group: Members
Posts: 13,409
Joined: 26-January 04
Member No.: 13



Hi Ishan, and welcome to the forum!

>> 8 pm onwards starts running a ALTER TABLE AD_CHANGELOG statement

That is DDL, a privileged DBA command!

What is the "alter table" doing?

I would find the script that is generating this, maybe in dba_jobs.




--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2017 - 06:15 PM