Moving databases from Azure SQL to another one using Azure DevOps pipeline
ahmedayadi
Posts: 2 New member
Hello,
I have to move many databases from Azure SQL Server to another one. Each SQL server is located in a different Subscription.
I am using Azure DevOps.
Have you any idea about how to do it?
I have to move many databases from Azure SQL Server to another one. Each SQL server is located in a different Subscription.
I am using Azure DevOps.
Have you any idea about how to do it?
Tagged:
Answers
It would largely depend on your existing (if any) configured pipelines, if you have existing migrations etc.
If we're simply talking about retargeting existing deployment pipelines then this is a simple matter of configuration, either in the ADO variables or the flyway config.
Whereas if you need to involve some comparison technology to generate the scripts for such, this is a more involved question that would also need to leverage others tools such as SQL Compare and possibly a data component or Flyway Desktop.
Lastly, it may be possible to perform some of these transitions within Azure's on ecosystem, though there are some limitations.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-resource-group-and-subscription
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/move-support-resources
There is no existing pipeline.
We have a complex Web app with many databases deployed on a resource group named RS1 under a subscription named SB1. We need to move the databases to a new resource group named RS2 under a new subscription named SB2.
We are thinking about using Data Factory Jobs or Powershell script in our Azure DevOps pipelines, but may be Redgate has better tools to do it (we have all the Redgate licenses).
Regarding our tooling, yes there are a variety of ways to achieve this. ultimately it will breakdown into two phases the comparison phase and the deployment phase.
Whether this takes the form of backups, scripted migrations, our tools need something to transfer and then a deployment technology, since you posted in the Flyway forum that's presumably what you're considering.
I'd expect the deployment phase to be the most straightforward and the larger effort being determining what you want to transfer.
As you have all the licenses, it's probably easiest if you check https://www.red-gate.com/products/flyway/enterprise for the technical resources and see which fit your usecase best.
Since you said you have many dbs, you're likely to want to script out your definition in ADO, here are some sample definitions to contextualise what you could do, it may also be possible with something simper, depending on your needs.
https://documentation.red-gate.com/fd/pre-build-azure-devops-yml-self-hosted-windows-agent-158564470.html
https://documentation.red-gate.com/fd/pre-build-azure-devops-docker-yml-microsoft-hosted-agent-160727137.html