gpt4 book ai didi

azure - 将本地 SQL Server DB 备份到 Azure Blob 存储失败,并显示 (400) 错误请求

转载 作者:行者123 更新时间:2023-12-03 03:33:31 25 4
gpt4 key购买 nike

我在尝试将本地数据库备份到 Azure Blob 存储时不断收到以下错误。

Msg 3271, Level 16, State 1, Line 8
A nonrecoverable I/O error occurred on file
"https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2016.bak:"
Backup to URL received an exception from the remote endpoint. Exception Message:
The remote server returned an error: (400) Bad Request..
Msg 3013, Level 16, State 1, Line 8
BACKUP DATABASE is terminating abnormally.

我遵循了规定的方法[1]创建凭证:

CREATE CREDENTIAL [testcred] WITH IDENTITY = 'mystorageaccount'  
,SECRET = 'storage account key';

[2]创建存储帐户 URL 的备份

BACKUP DATABASE AdventureWorks2014  
TO URL = 'https://mystorageaccount.blob.core.windows.net/mycontainer/AdventureWorks2016.bak'
WITH CREDENTIAL = 'testcred'
,COMPRESSION
,STATS = 5;
GO

我已尝试使用通用存储 v2 和 v1,但错误仍然存​​在。我也尝试过使用 SAS token ,但它给出了相同的错误我尝试了 SQL Server 2014 Express 和 2017 Express。同样的错误

最佳答案

在尝试从 SQL Server Management Studio 中的“连接”选项直接连接到 Azure 存储帐户时我终于看到了问题的线索,如下所示:

enter image description here

我不断更改存储帐户设置中的TLS 版本,直到找到与正在运行的 SQL 版本 (2017 Express) 相符的正确选项。对我来说它是“1.0 版”。但请小心这一点,因为它管理数据在 Azure 和计算机之间移动时的加密方式。请参阅 Microsoft 文档: enter image description here

得了吧,微软,简单地发送“远程服务器返回了错误(400)错误请求”对任何人都没有帮助。尤其是普通技术人员。

关于azure - 将本地 SQL Server DB 备份到 Azure Blob 存储失败,并显示 (400) 错误请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74160747/

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