Options

PK dropped for no purpose with version 5.2

EricEric Posts: 35
edited October 4, 2006 5:21PM in SQL Compare Previous Versions
When trying to synch two databases that differed only by their extended properties, the script generated by SQL Compare dropped a number of FK and PK, recreated some, but not all of them.

Result: errors at execution time.

Running just the part of the script adding the extended properties was ok and a schema compare done afterwards showed identical schemas. There is indeed a problem with 5.2

runned on sql 2005 version 9.00.2047.00

any help appreciated.

Eric

Comments

  • Options
    Eric,

    Are you comparing SQL 2000 to 2005?
  • Options
    No 2005 only. Same server in fact.
  • Options
    Hi Eric,

    Sorry but I'm flying blind here. I don't have any known problems logged that would cause this. I'm going to have to ask you for some schema snapshots for these two databases. If you don't mind, you can send them to support at red-gate.com.

    Thanks!
  • Options
    Brian,

    I think I have found the culprit. In reviewing the compare options I was surprise to see that Ignore Indexes was ON. The "Ignore" word is in the header and easy to miss and my eye just saw that Indexes was checked.

    Anyway, that schema has some FK defined on unique indexes that are not necessarily PK. This is legal/valid and there are good design reasons for this (NULL are invalid in PK but not in unique keys & I dislike compound PK made of 4+ columns).

    I unchecked that option and the synch script was ok...

    Eric
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I'll keep that in mind for the future. Thanks!
This discussion has been closed.