简体   繁体   English

如何调试SQL Server 2014托管备份到Azure?

[英]How to debug SQL Server 2014 Managed Backup to Azure?

I'm hoping to configure and use SQL Server 2014's Managed Backup to Azure feature. 我希望配置和使用SQL Server 2014的托管备份到Azure功能。 I've tested a manual backup to URL T-SQL query, and it worked. 我已经测试了手动备份到URL T-SQL查询,它工作正常。 But, the backups created by the managed backup to Azure feature are failing to finish. 但是,托管备份到Azure功能创建的备份未能完成。

The managed backup process leaves a bunch of 0 byte backup files on Azure storage, and they're all locked (active leases) because of the failed backup process. 托管备份过程在Azure存储上留下了一堆0字节备份文件,由于备份过程失败,它们都被锁定(主动租用)。 I'm trying to figure out what the issue is. 我想弄清问题是什么。 My SQL Server 2014 edition is the Web edition, which apparently does not support compression. 我的SQL Server 2014版是Web版,显然不支持压缩。 The SQL Server Management Studio dialog for configuring the managed backup to Azure feature does not provide any options for compression, though. 但是,用于将托管备份配置为Azure功能的SQL Server Management Studio对话框不提供任何压缩选项。 So, perhaps it's trying to compress the backup file and failing? 那么,也许它正在尝试压缩备份文件并失败? I don't know how to see what's actually being tried by SQL Server while it does its automated backup to Azure, though. 不过,我不知道如何看到SQL Server在自动备份到Azure时实际尝试了什么。 Anybody have any ideas there? 有人在那里有任何想法吗?

I'm seeing the following errors in the event log ... 我在事件日志中看到以下错误...

Date 10/1/2014 3:10:39 PM Log SQL Server (Current - 10/1/2014 2:42:00 PM) Source Backup Message BACKUP failed to complete the command BACKUP LOG CaseLaw. Check the backup application log for detailed messages.

Date 10/1/2014 3:12:01 PM Log SQL Server (Current - 10/1/2014 2:42:00 PM) Source spid71 Message Error: 18210, Severity: 16, State: 1.

Date 10/1/2014 3:12:01 PM Log SQL Server (Current - 10/1/2014 2:42:00 PM) Source spid71 Message BackupVirtualDeviceFile::DetermineFileSize: SetPosition(0,EOF) failure on backup device 'https://caselaw.blob.core.windows.net/sqldb01-mssqlserver/CaseLaw_d68e6c91feba4f7f891a66cb86fcce8d_20141001151038-05.log'. Operating system error Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: (409) Conflict..

I can't read the full 409 error message, so I've got no idea what the actual 409 error is. 我无法读取完整的409错误消息,所以我不知道实际的409错误是什么。 According to MSDN, there are multiple possible 409 responses . 根据MSDN,有多种可能的409响应

I have been struggling with this issue for several days. 几天来,我一直在努力解决这个问题。 I tried a manual scheduled task that runs my T-SQL query, which works, but I can't have it automatically clean itself up after X days, using that method. 我尝试了一个运行我的T-SQL查询的手动计划任务,但是我无法在X天之后使用该方法自动清理它。 Any ideas? 有任何想法吗? Thanks! 谢谢!

This is indeed related to COMPRESSION being set on the backup command that gets called by the Managed Backup process. 这确实与在托管备份进程调用的备份命令上设置的COMPRESSION相关。

Enabling debug messages pointed me to the stored procedure getting called: [msdb].[smart_admin].[sp_do_backup]. 启用调试消息指向我调用的存储过程:[msdb]。[smart_admin]。[sp_do_backup]。 If you look inside this stored procedure you will see "COMPRESSION" hard coded into the various backup commands that it issues. 如果您查看此存储过程,您将看到“COMPRESSION”硬编码到它发出的各种备份命令中。

A find and replace for "COMPRESSION" to "NO_COMPRESSION" should fix your issue. 找到并替换“COMPRESSION”到“NO_COMPRESSION”应该可以解决您的问题。

Note this only need apply to SQL 2014 Web Edition, as other versions support compression, and this shouldn't even come up. 请注意,这只需要适用于SQL 2014 Web Edition,因为其他版本支持压缩,甚至不应该出现这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM