When configuring a Build Pipeline within Azure DevOps and selecting "Temporary server type" = "SQL server", the server field is self-explanatory, but what is the Database field for? Is there a walkthrough for using this configuration?
Comments
4 comments
-
It's the database name. There's a tooltip giving more information on the field: "Specify an existing database if you wish to use the same database for each build. If you want to use an Azure SQL Database, you must create a database and give the name here. SQL Change Automation cannot create a temporary database in Azure SQL Database."
Regarding walkthroughs we have an example in our documentation under
https://documentation.red-gate.com/display/SCA3/Use+the+Azure+DevOps+Build+extension+with+SQL+Change+Automation+Project
-
Be careful of using a specific database as this can cause issues with parallel builds
-
The walkthrough provided doesn't match my use case. It specifies "SQL Localdb (recommended)" but I am specifying "SQL Server" which enables the "SQL server" field and the "Database". Here is my understanding: the "build" is going to be triggered by the pipeline, and then it will use the Agent that I have installed on my internal SQL server (specified in SQL Server field), but what is the Database field? If I enter TemporaryDatabase, will the build agent create this database and then delete it after it's done, or will it be permanent on my server? What if I specify an existing database?
-
OK, here's me Azure DevOps build step I use in most demos. I do have the agent running internally and just use AzDevOps for orchestration.If I specify a server, then builds occur there. Do this is a point of contention for parallel builds.Keep this in mind if you have lots of parallel builds. Here is a demo build running right now. It's the dlmau_____ one.
I don't specify a db (leave blank), which means the SCA cmdlet will create a randomly named db and perform the build there. This is the preferred way, because if I need to run multiple builds, I can. If I specify a db name, then this database will be used. This is where parallel builds from different developers can collide. In this case, I set a name and started a build. Here's the config.This db doesn't exist, so when I run the build, I see this.
Does this make sense?
Add comment
Please sign in to leave a comment.