0

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?

1 Answer 1

0

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"
Sign up to request clarification or add additional context in comments.

1 Comment

@Pratik_Lad - Thanks for the detailed description. I am making these REST calls in a custom program that makes download requests for thousands of databases and checks their status. For a few databases, importExportAzureAsyncOperation HTTP call returns Completed as the status of the databases but for large databases, it keeps returning only InProgress for days and it never ends. I am not able able to figure out where the importExportAzureAsyncOperation HTTP call fails.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.