Krrish
Krrish

Reputation: 135

Azure SQL Database ExportOperationResults is always InProgress

Exporting databases using Microsoft REST API (https://learn.microsoft.com/en-us/rest/api/sql/2022-05-01-preview/databases/export?tabs=HTTP) and exporting results is a success for all the databases. In order to check the progress of the database export I am using Location or Azure-AsyncOperation attributes returned as HTTP header in the database export HTTP request.

Sample Location and Azure-AsyncOperation attribute values:

https://management.azure.com/subscriptions/subscriptionid/providers/Microsoft.Sql/locations/southeastasia/importExportOperationResults/2511286d-8e01-41df-83e9-03c5ca8e027a?api-version=2022-05-01-preview
https://management.azure.com/subscriptions/subscriptionid/providers/Microsoft.Sql/locations/southeastasia/importExportAzureAsyncOperation/2511286d-41df-83e9-03c5ca8e027a?api-version=2022-05-01-preview

Location and Azure-AsyncOperation URLs return Completed, Succeeded, or InProgress export status. For most of the databases, these REST calls return InProgress as status for hours although the database has been backup up.

Any suggestion on what could be going wrong?

Any other way to check the database export status?

Upvotes: 0

Views: 214

Answers (1)

Pratik Lad
Pratik Lad

Reputation: 8301

Azure SQL Database ExportOperationResults is always InProgress.

I also tried the same, but I am getting Succeeded as a output when checked after an hour of exporting database.

API I am using:

https://management.azure.com/subscriptions/subscriptionID/providers/Microsoft.Sql/locations/westus3/importExportAzureAsyncOperation/8c32bac7-6d0e-4d1e-9e0e-be78231700f3-servertestab?api-version=2021-05-01-preview

enter image description here

Even after the export has been finished, the status could continue to be InProgress for a while. There are several potential causes for this, including network delay, server load, and other elements.

Any other way to check the database export status?

  1. Using the Azure portal is one technique to determine the status of the export process. You may verify the status of the export operation by navigating to Activity log the blade.
  • Go to your database >> Activity log

enter image description here

  1. The another way to get it by using powershell command Get-AzSqlDatabaseImportExportStatus from this MS document
Get-AzSqlDatabaseImportExportStatus -OperationStatusLink  "https://management.contoso.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource01/providers/Microsoft.Sql/servers/server01/databases/database01/importExportOperationResults/00000000-000-0000-0000-000000000000?api-version=2014-04-01"

Upvotes: 0

Related Questions