How to fix SQL backup to URL error: The remote server returned an error: (400) bad request

Posted in: Cloud, Microsoft SQL Server, Technical Track

You are trying to take a native SQL Backup to URL and you receive the error below:

Msg 3271, Level 16, State 1, Line 1
A nonrecoverable I/O error occurred on file “”
Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: (400) Bad Request..
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.



You are trying to save a blob file using to non-blob storage or not using the Blob storage endpoint. Check your URL to see if you are pointing to the correct one. SQL Server backups can only be saved to Blob storage. If you are using general purpose storage, you will have multiple endpoints for different usage. You should be using the Blob url for SQL backups – see from the picture below. The one in the green box is the Blob storage endpoint. Using any other endpoints would result in a Bad Request Error. The same is true when using the other endpoints. You should be using it for the correct file types.



Review the url path you are trying to restore to and make sure you are using the correct endpoint for Blob Storage.


Interested in working with Pio? Schedule a tech call.

About the Author

Lead Microsoft Data Platform Consultant
Pio Balistoy is a Microsoft MVP for Data Platform from Singapore. He has been a Database professional for more than 17 years. He brings his passion for SQL to the community by being one of the Community leads for both Philippine Data Platform Forums (formerly Philippine SQL Server User Group) and Singapore SQL PASS.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *