Is this a bug?

I used v6.1.0.53 of SQL Compare to script out a database (3307 objects). I then did a comparison where the source was the scripts and the target was an empty database. I then attempted to synchronize the target with the source. I got an error because SQL Compare attempted to create a view that references a user-defined function that hadn't been created yet.

Is SQL Compare supposed to be intelligent enough to know the order in which to create the objects? If not, how do you suggest I create a new database from scripts?

Thanks - Randy

Comments

  • I've spent some more time on this and determined that the error only occurs if I attempt to synchronize the target from with SQL Compare. If I generate a script and execute it in Management Studio, it runs fine. This clearly seems to be a bug in SQL Compare.

    Thanks - Randy
  • SQL Compare is supposed to be intelligent enough to know the order in which to create the objects.

    There are a few circumstances where we know it fails, but these are mostly cases where you can't actually create the whole database in one operation any more because there are circular dependancies. We do occasionally run into problems with large quantities of inter-related stored procedures and views, however.

    If you can send a database backup / snapshot to michelle.taylor@red-gate.com, I can find out what the problem is and we can work on fixing it - I'm quite intrigued as to why it would fail in SQL Compare and not in SSMS (there are occasions where SQL Compare will stop running a script at an error and you can get a partial database out by running in SSMS, but SSMS always produces an error message in the cases we know about).
    Software Developer
    Redgate Software
Sign In or Register to comment.