Today I was facing the challenge that an import of a BACPAC file did not finish in a reasonable amount of time.

The process simply remained unchanged for about 4 hours in the state you can see in the above screenshot.

After investigating this further I found the money quote in the Microsoft documentation [1].

The Azure SQL Database Import/Export service provides a limited number of compute virtual machines (VMs) per region to process import and export operations. The compute VMs are hosted per region to make sure that the import or export avoids cross-region bandwidth delays and charges. If too many requests are made at the same time in the same region, significant delays can occur in processing the operations. The time that's required to complete requests can vary from a few seconds to many hours.

The documentation also states that an import will be cancelled if it is not processed within four days.

Unfortunately the Azure portal does not offer an option to cancel an import out of the box. For this you need to use the PowerShell (inside the portal). You can find a detailed description for this here.

To speed things up you can perform this import using your local SQL Server Management Studio (SSMS). For this simply refer to the necessary steps in [3] specifically section »Importing a data-tier application in SQL Server Management Studio«. Of course this is only an option if your internet connection is sufficient for the amount of data that needs to be moved. If not you can still deploy an Azure VM and run the import process from there.

Resources

  1. Import and export of a database takes a long time - Azure SQL Database | Microsoft Docs
  2. How to cancel Azure SQL Database Import or Export operation - Microsoft Tech Community
  3. An introduction to Data-Tier applications in SQL Server - WayBack
Add your reply here with Webmention (you must link to this page in its canonical form)
Webmentions are approved manually. Will take some time until they show up.