Overview
Recently I wanted to create a SQL Backup Maintenance plan that would backup to an Azure storage blob container. After completing the GUI the backup step would not complete, instead I got the error “Use of WITH CREDENTIAL syntax is not valid for credentials containing a Shared Access Signature”
Solution
The solution is to clear the “CredentialName” property for the step after creating it.
Step 1
Setup your backup step setting the destination as URL on the General tab and complete the following fields on the Destination tab.
Step 2
Right-click your backup task and select properties.
Step 3
In the Misc section of properties pane clear the contents of the field “CredentialName”
Step 4
Save and test your maintenance plan.
This doesn’t work on SQL 2016. After clearing the credential field, the job just sets the URL field to “…”, which results in the following error: “Invalid zero-length device name. Reissue the BACKUP statement with a valid device name. BACKUP DATABASE is terminating abnormally.”. I’ll stick to using scripts for the Maintenance Plan backup to URL for now.