Blog Post

Azure Database Support Blog
2 MIN READ

Azure SQL Database BACPAC Export Stuck with Private Link and Resource Locks

hudajazmawi's avatar
hudajazmawi
Icon for Microsoft rankMicrosoft
Apr 27, 2026

Azure SQL Database BACPAC export operations may sometimes appear to complete (reaching 100%), yet remain stuck indefinitely or fail to cancel properly. This behavior is commonly observed when using Import/Export with Private Link, particularly in environments where resource locks (Delete locks) are applied. Understanding how Private Link interacts with resource locks is key to identifying and resolving this issue.

 

Symptoms

In real customer environments, this issue commonly appears in the following forms:

  • An export job is stuck at Running (100%) and never completes, blocking scheduled or automated export jobs.
  • A BACPAC export operation is canceled (via Azure Portal or CLI), but remains in CancelInProgress for an extended period (for example, more than n hours) without progress.
  • Multiple databases are impacted, where previous export operations remain stuck, preventing new export requests from starting.
  • New export attempts fail with the following error: "There is an import or export operation in progress on the database."

These scenarios can significantly impact automation pipelines, backup strategies, and overall operational workflows.

 

Example from Azure Portal

The following example shows an export operation stuck during cancellation, along with the corresponding error message:

Figure 1: Export operation stuck in CancelInProgress and error indicating another operation is in progress
 
 

 

 

 

 

 

 

 

 
Root Cause

When you enable the Use private link option during import or export, the service automatically creates temporary, service-managed private endpoints to securely connect the Azure SQL Database to the target Storage Account. You must manually approve the private endpoint for both the Azure SQL logical server and the Azure Blob storage account in separate steps. This tutorial includes the details.

These private endpoints are automatically deleted during the cleanup phase, which occurs when the export operation completes or is canceled.


However, if a Delete lock exists on any of the following resources:

  • Azure SQL Logical Server / Database
  • Azure Storage Account
  • Resource Group (might be an inherited lock)

As a result:

  • The service cannot delete the service-managed private endpoints
  • Backend cleanup operations fail to complete
  • The export/cancel operation remains stuck in an intermediate state

This leads to scenarios where:

  • Export appearing completed (100%) but not finalized
  • Cancellation stuck in CancelInProgress
  • Further Import/Export operations are blocked

This behavior is consistent with cases where resource locks prevent required cleanup operations: Import or Export a Database Using Private Link - Azure SQL Database | Microsoft Learn

Figure 2: Limitation of using Private Link for Import/Export with resource locks applied

 
 

 

 

 

 

 

 

 

 

 

Resolution

To unblock the operation:

  1. Remove the Delete lock from the affected resources:
    • Azure SQL Server / Database
    • Azure Storage Account
    • (Check Resource Group level for inherited locks)
  2. Wait for the backend system to:
    • Complete Private Endpoint cleanup
    • Finalize the export or cancellation operation
  3. Validate that:
    • Operation transitions out of Running / CancelInProgress
    • No active Import/Export operation remains

 

Key Takeaway

Import/Export operations using Private Link depend on temporary service-managed infrastructure (private endpoints).

Any restriction (such as a Delete lock) that prevents cleanup of these resources can cause the operation to remain stuck at completion or cancellation phases.

 

References
Updated Apr 27, 2026
Version 1.0
No CommentsBe the first to comment