Reputation: 135
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
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
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?
Activity log
the blade.Get-AzSqlDatabaseImportExportStatus
from this MS documentGet-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