Ignoring Diffs in Enabled vs. Disabled? Foreign Keys
mjswart
Posts: 4
I'm running SQL Compare 10.4.8.87
I'm comparing two databases: The first is defined like this:
The second is defined like this:
When ignore nocheck is disabled (triple negative! meaning scrutinize nocheck), these compare as different (good!)
When ignore nocheck is enabled, these compare as the same, but that's not what I expected. The docs say disabled FKs are not ignored with this option and yet it seems to be ignored.
In my project, I really would like to ignore FK trustedness, but I really want to care about FK disabledness.
I'm comparing two databases: The first is defined like this:
create database [Disabled] go use [Disabled] go create table A ( id int identity primary key ) create table POINTER1 ( id int identity, a_id int, constraint pk_POINTER1 primary key (id) ) go ALTER TABLE POINTER1 WITH NOCHECK ADD CONSTRAINT FK_A_POINTER FOREIGN KEY (a_id) REFERENCES A (id) go ALTER TABLE POINTER1 NOCHECK CONSTRAINT FK_A_POINTER; go
The second is defined like this:
create database [Enabled-NotTrusted] go use [Enabled-NotTrusted] go create table A ( id int identity primary key ) create table POINTER1 ( id int identity, a_id int, constraint pk_POINTER1 primary key (id) ) go insert A default values; insert POINTER1 (a_id) values (2); go ALTER TABLE POINTER1 WITH NOCHECK ADD CONSTRAINT FK_A_POINTER FOREIGN KEY (a_id) REFERENCES A (id) go
When ignore nocheck is disabled (triple negative! meaning scrutinize nocheck), these compare as different (good!)
When ignore nocheck is enabled, these compare as the same, but that's not what I expected. The docs say disabled FKs are not ignored with this option and yet it seems to be ignored.
In my project, I really would like to ignore FK trustedness, but I really want to care about FK disabledness.
Comments
Just a note to anyone looking into this post -- we have a support ticket open currently and I'll post more here when I finish my investigation.
Thanks,
Evan
Product Support
(866) 627-8107
(reference SC-4077)
After updating our system, it does appear this is being discussed for a fix (SC-4077). I don't have a timeline, but it's definitely on the radar.
You're welcome to contact us periodically for updates on the bug. You can also check release notes for the list of bugs fixed each version: http://documentation.red-gate.com/displ ... ease+notes
Thanks,
Evan
Product Support
(866) 627-8107