azureazure-sql-databaseazure-resource-managerazure-sql-serverazure-rest-api

How do you check the status of a SQL Import Export Operation in Azure?


I am performing a SQL Database Import using a BacPac file to Azure using the REST management API. I need to be able to check the status of an import, as Azure does not allow for me to send events when the import succeeds.

Here is the documentation for the operation I am performing: https://learn.microsoft.com/en-us/rest/api/sql/databases%20-%20import%20export/import

I have already tried using the Azure's Analysis Services API to check an operation's status by the operation id and the region it occurred in. Calling this endpoint however is returning me a 404 not found.

Here is the documentation for Azure's Analysis Services API endpoint I am attempting to call with my import's operation id and the region it occurred in: https://learn.microsoft.com/en-us/rest/api/analysisservices/servers/listoperationresults

I am expecting the Analysis Services to provide me with the status of an import/export operation I started using the Azure Management API. Doing so is resulting in a 404, so I'm not sure if I'm calling the correct API endpoint (I double checked to make sure there are no typos in the URI I am building to check the operation status).


Solution

  • I do know how to track the progress of an import/export operation if you use PowerShell instead but I don't know a way to track the progress using Azure REST API.

    If you use PowerShell New-AzureRmSqlDatabaseImport cmdlet to import a database or you use New-Azure​RmSql​Database​Export to export a database then you can use Get-AzureRmSqlDatabaseImportExportStatus to track the progress of the import/export operation.