I got this error while trying to back up the Azure SQL DB. The screenshot below is for your reference.

The complete error message is as below
System.Data.SqlClient.SqlError: A nonrecoverable I/O error occurred on file “https://demostoragesql5.blob.core.windows.net/mynewdb/TSINFODB_backup_2021_01_12_151612.bak:” Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: (400) Bad Request.. (Microsoft.SqlServer.Smo)
For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server& ProdVer=16.100.41011.9+(SqlManagementObjects-master-APPLOCAL)&LinkId=20476Cause
When saving a blob file to a Non-Blob Storage or not using the Blob Storage Endpoint. SQL Server backups can only be saved to a Blob Storage. If you choose the Storage account as General Purpose Storage, you will have multiple endpoints for different usage.
Solution
To fix this error, You need to make sure the following stuff
While creating the Azure Storage account, If You select the Account kind as General Purpose. You will get multiple Endpoints for different purposes.

Make sure to choose the correct endpoint. For example, if you are trying to store the SQL DB in blob storage, you should choose the Endpoint meant for Blob storage, not for other purposes like File, Queue, Table, etc.

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.
