We have about 2 Terrabytes of data in SQL Server 2014 on-prem servers that we need to move into Azure SQL. The data is distributed among about 50 databases with no database larger than 200GB.
The best method we have come up with so far which ends with importing bacpac files to create the database on Azure SQL, is very slow. Even a database less than 100GB takes about 7 hours to complete the process. About 6 of those hours is spent creating and restoring a bacpac file.
The SQL 2014 database implementations are not compatible with Azure SQL so we have to move them through an upgrade process. We are doing that on a SQL 2019 instance we have set up on a Azure SQL Server VM. To get the database on that platform we can run a simple backup restore which is very quick. We then run a DevOps pipeline against each database to update the code and structural issues that need to be addressed. All databases have identical structure. The pipeline process isn't quick (taking about an hour) but has been optimized and so we are not looking to improve it further.
It is the rest of our process that I am wondering if anyone sees ways to improve on:
Next, we create a bacpac of each updated database and store it directly onto an Azure storage account. This is also very slow - over 2 hours for 100GB.
We then create a new Azure SQL database using the bacpac. We have tried doing this from local workstations with fast connections, from another Azure VM both using the "Import Data Tier" application in SSMS, through the command line using sqlpackage.exe, and using the Create Database option on the Azure portal. The SSMS methods fail about 70% of the time with memory errors but the portal and sqlpackage.exe methods work quite reliably. We have found the Azure Portal method to be about 20% faster than sqlpackage.exe. The problem is the time required. Our latest test of a 100GB database was 3 hours 58 minutes for this step.
I have tried increasing the resources the database has. I started with a Gen5, 4 vCores configuration and performance did improve upgrading to a Gen5, 8 vCores configuration. I did not see any appreciable difference moving up to Gen5 16 vCores, however.
Before landing on the bacpac import method, I also tried the data migration wizard tool from Microsoft but never had a successful test on any database over about 10GB - even waiting up to 8 hours for it to complete. No errors were reported.
Does anyone know of a faster way to accomplish this migration? and especially the final step to create the database from a bacpac? Is there a better way? For example, if the database is compatible, is there any way to run a SQL 2019 backup and just restore that onto Azure SQL?
Thanks!