SQL Compare Objects referencing Objects
gbargsley
Posts: 34 Bronze 4
I am trying to build a script for a database using SQL compare 9.
We are running in to issues where Stored Procedures and Views are referencing other objects that have not been created yet by the SQL Compare so the entire compare is failing.
Is there a way to get the compare to generate in an order that will build the dependency items first then deploy the calling object.
For example I have this error:
It appears that vMainView is being created before vSubView.
We are running in to issues where Stored Procedures and Views are referencing other objects that have not been created yet by the SQL Compare so the entire compare is failing.
Is there a way to get the compare to generate in an order that will build the dependency items first then deploy the calling object.
For example I have this error:
The following error message was returned from the SQL Server: [208] Invalid object name 'vSubView'. The following SQL command caused the error: CREATE VIEW dbo.vMainView AS SELECT a.* FROM vSubView A INNER JOIN (SELECT DISTINCT b.[Source] FROM vSubView b WHERE b._updated = (SELECT Max(c._updated) LastUpdated FROM vSubView c)) d ON a.Source = d.Source
It appears that vMainView is being created before vSubView.
Comments
We already have a support call open for this and are dealing with you via email. (I need to put this on the forum to prevent a second support call being raised for the same thing.)
I am having this same issue described by gbargsley. Is there a standard approach to handling object dependencies using SQL Compare 9?
Thanks,
Karl
Again, I recommend you email Red Gate support directly. It's supposed to "just work".