Maintenance plan will not backup to URL
Microsoft SQL Server 2012 (SP4) (KB4018073) - 11.0.7001.0 (X64)
Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
Microsoft SQL Server Management Studio 14.0.17230.0 (v17.6)
The 'Back Up Database Task' within Maintenance Plans appears to ignore Backup to URL settings and still backs up to the 'Folder' defined for Backup To Disk. See attached screenshot. On the General tab, 'Back up to:' dropdown has 'URL' selected, thus the Azure credentials etc are available to enter on Destination.
These credentials/container/URL prefix work when doing a manual backup either via plain T-SQL or database Tasks-->Backup. The backup existence can be verified in Azure portal.
If I click the 'View T-SQL' on the task window, I get valid 'TO URL = ...' code which successfully backs up to Azure if I copy-paste it to a new query window.
However, if I save the maintenance plan then Execute it, the backups are written to the F: drive location that is greyed out in the Destination tab. If I switch to Backup to Disk, edit the Folder path to be something else (e.g. C: drive), then switch back to Backup to URL, and save, the backups are written to the C: drive.
Expected behavior is that whenever Backup to URL is chosen on the task's General tab, the local folder path is completely ignored and backups always write to Azure container.
I'm chalking this up to yet another reason NOT to use built in maintenance plans (unless one has time to re-work them and that really defeats the concept). Generating the Transact-SQL to finding it incorrect has me shaking my head.
I followed the directions and tried to use maintenance plans to back up all database transaction logs (it makes it easier for the new generation transfixed on GUI's). As noted the generated task is incorrect and yes the agent job when run also fails BUT the reason, on this version of SQL, turns out the URL is blank.
-- 2020-01-23, Note, changed the credential removing confidential information.
BACKUP LOG [SSISDB] TO URL = N'' WITH CREDENTIAL = N'https://MyBlob.blob.core.windows.net/myContainer'; , NOFORMAT, NOINIT, NAME = N'SSISDB_backup_2020_01_23_094953_7557463', SKIP, REWIND, NOUNLOAD, COMPRESSION, STATS = 10, CHECKSUM
Lewis Hamill commented
I too am having this issue. Does anybody have a workaround?