Options

Synchronisation script order incorrect

petervdmpetervdm Posts: 3
edited November 25, 2009 7:54AM in SQL Compare Previous Versions
Hi,

We are having problems (sometimes) with the synchronisation script generated by SQL Compare. We have some stored procedures that select data from views.

These are all created by our codegen process and when we want to sync these into our main dev database the synchronisation script is sometimes created in the wrong order in that it wants to create the stored procedure before the view it relies on has been created.

Its a quick fix to just reorder the items in the script file but a real pain in our automated build environment.

Anybody had these problems? Is there somesetting I can use to aid me here?

Thanks in advance

Peter

Comments

  • Options
    Hi Peter,

    Does the view also make use of the stored procedure? We have seen this sort of behaviour happen in objects with circular dependencies.

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • Options
    Hi Pete,

    No unfortuately the view does not use the stored procedure. I must add that we do this quite a bit in our codegen and most of the time SQL Compare gets it right.

    We also have problems occasionaly where we create a new function, then modify an existing stored procedure / function to use that. SQL Compare then creates the script modifying the existing stored proc / function and then only creating the function/s at the end of the script - which fails.

    Peter
  • Options
    Hi Peter,

    I think this is a known bug, SC-2921. If however you can send me some snapshots of the schema so I can see it going on here, I can then update the bug with your schema information too in the hope that it can be fixed in a later edition of the tool. The more information we have the better.

    If you want to zip up the schema files and send them to support(at)redgate.com FAO me that would be great.

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
Sign In or Register to comment.