Sql-server – Backup to Azure Blob Failing with Hallengren Framework

azure-vmbackupola-hallengrensql serversql-server-2016

We are running IAAS VMs in Azure using SQL Server 2016 SP1 CU2. We are backing up to blob storage using a URL, and the errors received are shown below and described in the MS Connect URL provided. The defect is marked as corrected in the CU that we are running.

1117(The request could not be performed because of an I/O device error.)

According to the article, the workaround is to specific MAXTRANSFERSIZE. When I provide this parameter(@MaxTransferSize = 4194304), the job starts failing with the error

The value for the parameter @MaxTransferSize is not supported.

I dug into the stored procedure to find the “OR” condition (@MaxTransferSize IS NOT NULL AND @URL IS NOT NULL). The complete line from the stored procedure is shown below. Was there a reason for this last condition to be added as Microsoft is recommending this use. I temporarily commented out that condition and the job succeeded.

IF @MaxTransferSize < 65536 OR 
   @MaxTransferSize > 4194304 OR 
   @MaxTransferSize % 65536 > 0 OR 
   (@MaxTransferSize > 1048576 AND @BackupSoftware = 'SQLBACKUP') OR 
   (@MaxTransferSize IS NOT NULL AND @BackupSoftware = 'SQLSAFE') OR 
   (@MaxTransferSize IS NOT NULL AND @URL IS NOT NULL)

I’m wondering if this last condition should be removed.

Best Answer

I have added support for BLOCKSIZE, and MAXTRANSFERSIZE, when backing up to Azure Blob Storage block blobs (using Shared Access Signature).

https://ola.hallengren.com/versions.html