Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable/Enable Foreign Key

Status
Not open for further replies.

stroll

Programmer
Sep 15, 2000
20
CA
I disabled a foreign key by selecting the disable? field in dba studio. Now I want to reenable the foreign key constraint and when I apply the changes I get a missing keyword error. Here is the SQL that DBA Studio creates when I try to make the change.

ALTER TABLE "PHPROD"."TBLKEYWORDS"
ENABLE NORELY VALIDATE
CONSTRAINT "FK_TBLKEYWORDS_1"

Thanks
 

Make sure the data exists in the referenced table before you enable the foreign key. Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
It looks to me that the NORELY is the problem. If you execute the statement from SQL*PLUS without the NORELY, I'll bet it will work. NORELY is supposed to be the default anyway. My reading of the documentation says that RELAY/NORELY should only appear in an ALTER TABLE..MODIFY CONSTRAINT statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top