Recently, I was working on a critical requirement for one of my clients. At the same time, I got this error running an SQL script that takes the backup of the SQL DB to the Blob storage.
Reason
I got this error because I didn’t include the WITH credential = ‘name of your SQL credential’ parameter with the SQL script to back up the Azure SQL database.
Solution
Along with the Database base SQL script, you need to add the below line
WITH credential = 'mySQLBackups';Here, mySQLBackups is the name of the SQL credential.
Check out the screenshot below for more clarity and the complete SQL script to take the Azure SQL backup I executed successfully without any issues.

You may also like following the articles below
- Backup/Restore to URL device error: Error while decoding the storage key.
- Generate SAS and connection string greyed out

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
