How can I build in Azure Devops with cross database queries?
Nick_Foster
Posts: 17 Bronze 2
I have an application with two databases, one for live production data and one for archived data. I am trying to get the live database under Change Automation but there are a number of views and stored procedures that reference or union with records in the archive database.
The project builds fine locally, but the Azure Devops build fails as it's in a hosted build agent and the archive database doesn't exist.
Is there a way to put both databases in the same source control solution and have them built and deployed together that would solve this problem? Or is there a way to prevent these verification failures?
The project builds fine locally, but the Azure Devops build fails as it's in a hosted build agent and the archive database doesn't exist.
Is there a way to put both databases in the same source control solution and have them built and deployed together that would solve this problem? Or is there a way to prevent these verification failures?
Answers
Two databases can't be in the same repo unfortunately unless you wanted to smash them together and use different schema names rather than keep them in separate actual databases.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Do you have any samples or information around creating a fake for validation purposes? I'm really new to this and would love some help.
Cheers.
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Tianjiao Li | Redgate Software
Have you visited our Help Center?
Has anyone done this before? Do you have any examples you can share?
We are using the hosted build service precisely so we don't have to maintain local build agents and keep them up to date. No-one has time for that, it's the reason we moved from TFS to Azure Devops.
I guess I'll have to find a way to script the stub database into whatever instance the Redgate tasks are using for the build.