Hi All,
I got into a very emergency situation so looking for some experts help. I disabled a constraint and performed a delete operation on a table. But after performing I'm not able to enable the same constraint. It should be enabled. Do we have any other way to enable a constraint even if there are parent keys are not found ? Please help. I mean like FORCE Keyword we have in oracle? If we drop a type object even if there are dependencies we can remove it. It's a foreign key constraint. The problem I dont have the parent records to insert now. Atleast can I see which are the datas violating the constraint with the master table.
The constraint details are below.
ALTER TABLE COMPONENT_MOVEMENT_HIST_LIFE ADD CONSTRAINT "FK_COMPLIFE_EXT" FOREIGN KEY ("PART_NUMBER", "SERIAL_NUMBER", "MOVEMENT_DATE", "DAY_SEQUENCE") REFERENCES "OASESANNOBON"."COMPONENT_MOVEMENT_HISTORY_EXT" ("PART_NUMBER", "SERIAL_NUMBER", "MOVEMENT_DATE", "DAY_SEQUENCE") DISABLE;
ALTER TABLE COMPONENT_MOVEMENT_HIST_LIFE
ENABLE CONSTRAINT FK_COMPLIFE_EXT;
Error starting at line 13 in command:
ALTER TABLE COMPONENT_MOVEMENT_HIST_LIFE
ENABLE CONSTRAINT FK_COMPLIFE_EXT
Error report:
SQL Error: ORA-02298: cannot validate (OASESANNOBON.FK_COMPLIFE_EXT) - parent keys not found
02298. 00000 - "cannot validate (%s.%s) - parent keys not found"
*Cause: an alter table validating constraint failed because the table has
child records.
*Action: Obvious