Creating views with dependencies

bmilnebmilne Posts: 6
edited June 20, 2005 9:33AM in SQL Compare Previous Versions
I am finding an issue when attempting to sync where a view that is to be created has a dependency on another view that is also to be created. It errors and will not create either. Has anyone experienced this and if so have they found a way around it outside of manually having to adjust the order in which the views are created?

Mullets are:

Sign in to vote!
This is a private poll: no-one will see what you voted for.

Comments

  • I've run into this problem as well. Whenever it happens, I just de-select the view with the dependent view and re-synchronize that view in afterwards.

    I do agree that this is quite an annoyance and would love to know a better solution.
  • I suppose that's doable, but very annoying when there is a lot of views that need to be picked through line-by-line. Thanks, though!
  • Yeah, you'd think that since Enterprise Manager has the ability to map object dependency trees (kind of), the guys from Red-Gate would have thought it a necessary feature.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    I'd think it would be pretty unusual if this didn't work. SQL Compare has a very sophistocated text parsing engine that builds the dependency list so that all dependent objects are scripted as part of the migration. Enterprise Manager uses the (notoriously unreliable) sysdepends table that breaks if object dependencies are rearranged after creation.

    I'd make sure that you have the 'include dependent objects' option on as the default dependency behavior can be changed with this option set in the comparison options.

    As usual, if you've got any scripts that you can send with examples of dependency chains that break SQL Compare, they're always welcome at our support department. (support at red-gate.com)
  • I'll try to submit one. I had to uncheck that box because then it was trying to copy over the user accounts and since they already existed on the other server it would error out at that point.
This discussion has been closed.