SQL Azure Rest API BeginExport ...如何检查导出是否完成 [英] SQL Azure rest api BeginExport... how to check if export completed

查看:66
本文介绍了SQL Azure Rest API BeginExport ...如何检查导出是否完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以编程方式将SQL Azure数据库导出到BACPAC文件,并且导出完成后,我需要删除数据库.

I need to programmatically export an SQL Azure database to a BACPAC file and once the export has completed I need to delete the database.

SQL Azure REST API允许我提交导出请求,该请求将运行并将数据库导出到Blob存储容器中.

The SQL Azure REST API allows me to submit an export request which will run and export the database to a blob storage container.

但是...我看不到如何检查导出请求的状态.

But... I can't see how to check on the status of the export request.

这是导出api描述:

Here's the export api description: https://docs.microsoft.com/en-us/rest/api/sql/Databases%20-%20Import%20Export/Export

以及整个SQL api描述: https://docs.microsoft .com/en-us/rest/api/sql/

And the overall SQL api description: https://docs.microsoft.com/en-us/rest/api/sql/

推荐答案

sys.dm_ operation_status DMV应该可以帮助您了解操作的状态.

The sys.dm_ operation_status DMV should help you know the status of the operation.

SELECT * FROM sys.dm_ operation_status   
   WHERE major_resource_id = ‘myddb’   
   ORDER BY start_time DESC;

有关此DMV的更多信息,请访问

For more inromation about this DMV, please visit this documentation.

如果您使用PowerShell Get-AzureRmSqlDatabaseImportExportStatus cmdlet可以跟踪导出操作和导入操作的进度.

If you use PowerShell New-Azure​RmSql​Database​Export cmdlet you can use Get-AzureRmSqlDatabaseImportExportStatus cmdlet to track the progress of an export operation and of an import operation too.

这篇关于SQL Azure Rest API BeginExport ...如何检查导出是否完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆