Comments
2 comments
-
We definitely work better when the database is self-contained and it's what we recommend. However, we understand sometimes cross-databases dependencies can't be avoided.
We did some research on this problem and this article might help https://www.red-gate.com/hub/product-learning/sql-change-automation/deploying-cross-database-dependencies
-
Thanks for pointing out this posting it was helpful, but too simplistic to really demonstrate the issues. It also did not refer to the issues in your tooling (Visual Studio Extension).
The problem I have is there are a number of cross database links. Views in one database that reference the other. Stored Procedures in the other database that use the view and multiple of these situations. We are also already using synonyms, this is because our database changes name as it goes from one environment to another (we run it multiple onsite locations and on premise). The problem is that it fails validation, building the shadow DB is not possible.
It needs to support cross-linked databases without work arounds. Another alternative would be to support partial databases in this case it would have to be OK to have unresolved references. Alternatively generating the base script should be able to identify all of the dependencies and bring them into the script so they can all be created.
Add comment
Please sign in to leave a comment.
Does SQL Change Automation support linked databases? and if so how do I get this to work