简体   繁体   English

从 SQL Server 到 Blob 容器的数据库备份在 24 分钟时失去连接

[英]Database Backup from SQL Server to Blob Container losing connection at 24 minute time

From SQL Server 2014, I am using a saved Credential to my Azure File Storage.从 SQL Server 2014 开始,我将保存的凭据用于 Azure 文件存储。 For a small database, using BACKUP DATABASE command, the backup was successful to the Azure storage container.对于小型数据库,使用BACKUP DATABASE 命令,成功备份到Azure 存储容器。 Fora large database, over 6TB, I expected the backup to take quite a while.对于超过 6TB 的大型数据库,我预计备份需要很长时间。 However, once the backup reaches a few seconds short of 24 minutes, it errors with the following error message (* values are hidden for security).但是,一旦备份达到不到 24 分钟的几秒钟,它就会出错并显示以下错误消息(* 为安全起见,隐藏了值)。

Executing the query "BACKUP DATABASE [Sup_********_249243_13dec19] TO..." failed with the following error: "Write on "https:// storageaccountname .blob.core.windows.net/dbdumps/Sup_********_249243_13dec19_backup_2019_12_26_125220_1290224.bak" failed: 1117(The request could not be performed because of an I/O device error.)执行查询“BACKUP DATABASE [燮_ ******** _ 249243_13dec19] TO ...”失败,出现以下错误: “写” https://开头storageaccountname .blob.core.windows.net / dbdumps / Sup_ ********_249243_13dec19_backup_2019_12_26_125220_1290224.bak”失败:1117(由于I/O设备错误,请求无法执行。)

SQL Command (items hidden for security): SQL 命令(为了安全而隐藏的项目):

BACKUP DATABASE [Sup_********_249243_13dec19] 
TO  URL = N'https://***storageaccountname***.blob.core.windows.net/dbdumps/Sup_********_249243_13dec19_backup_2019_12_26_125220_1290224.bak' 
WITH NOFORMAT, NOINIT,  
NAME = N'Sup_********_249243_13dec19_backup_2019_12_26_125220_1290224', SKIP, REWIND, NOUNLOAD, COMPRESSION,  STATS = 10
GO

While the job is running, I see the file in the storage container, with active Lease.当作业正在运行时,我在存储容器中看到该文件,并且具有活动的 Lease。 However, I cannot see where I can change the default Lease time.但是,我看不到在哪里可以更改默认租用时间。

Answer (to be tested) found at: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-backup-to-url-best-practices-and-troubleshooting?view=sql-server-ver15答案(待测试)位于: https : //docs.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-backup-to-url-best-practices-and-troubleshooting ?view=sql-server-ver15

Consider COMPRESSION, MAXTRANSFERSIZE, BLOCKSIZE and multiple URL arguments when backing up large databases.备份大型数据库时,请考虑 COMPRESSION、MAXTRANSFERSIZE、BLOCKSIZE 和多个 URL 参数。 See Backing up a VLDB to Azure Blob Storage ( https://blogs.msdn.microsoft.com/sqlcat/2017/03/10/backing-up-a-vldb-to-azure-blob-storage/ )请参阅将 VLDB 备份到 Azure Blob 存储 ( https://blogs.msdn.microsoft.com/sqlcat/2017/03/10/backing-up-a-vldb-to-azure-blob-storage/ )

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

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