gpt4 book ai didi

azure - 使用 SAS 将 Azure SQL DB 导出到 Blob 的正确方法是什么?

转载 作者:行者123 更新时间:2023-12-03 01:38:19 26 4
gpt4 key购买 nike

当我重复这里的步骤时: https://learn.microsoft.com/en-us/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-export

StorageAccessKey 工作正常。

SharedAccessKey 失败并显示:

Operation failed with status: 'Bad Request'. Details: There was an error that occurred during this operation : 'Error encountered during the service operation. ; Exception Microsoft.SqlServer.Management.Dac.Services.ServiceException:Unexpected exception encountered while retrieving metadata for blob 'https://satest.blob.core.windows.net/backup/mydb-2019-5-13-10-1.bacpac'.; Inner exception Microsoft.WindowsAzure.Storage.StorageException:The remote server returned an error: (403) Forbidden.; Inner exception System.Net.WebException:The remote server returned an error: (403) Forbidden.; '

我错过了什么?

最佳答案

Microsoft.SqlServer.Management.Dac.Services.ServiceException:Unexpected exception encountered while retrieving metadata for blob

从错误消息来看,您似乎还需要共享访问签名 (SAS) 中的读取权限。请重新生成具有读取写入权限的SAS。

az storage blob generate-sas --account-name myAccountName -c myContainer -n myBacpac.bacpac \ --permissions rw --expiry 2020-01-01T00:00:00Z

关于azure - 使用 SAS 将 Azure SQL DB 导出到 Blob 的正确方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56109801/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com