Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Alter foreign key not enforced not working

$
0
0
Running db2 LUW 10.1 fp 2 on Red Hat 5.9.

Check the foreign keys before a migration, then run an alter table to unenforce the foreign key:
alter table ACKWORK ALTER FOREIGN KEY FK133_ACKWORK NOT ENFORCED
DB20000I The SQL command completed successfully.

Migration fails with a set integrity violation on that same foreign key.

run a db2look to check the table and find:

ALTER TABLE "DANG "."ACKWORK"
ADD CONSTRAINT "FK133_ACKWORK" FOREIGN KEY
("BUSINESSID")
REFERENCES "DANG "."BUSINESSES"
("BUSINESSID")
ON DELETE NO ACTION
ON UPDATE NO ACTION
ENFORCED
ENABLE QUERY OPTIMIZATION;

Has anybody experienced this?

Viewing all articles
Browse latest Browse all 13329

Trending Articles