In SQL Server one error message can be caused due to many reasons. One of such error message is 3271 which is caused during failure of backup to URL command. Here are two earlier blogs about same error message 3271. (404) Not Found.
In this blog, we would discuss error 404 – Not Found. Here is the complete error message which can be seen.
Msg 3271, Level 16, State 1, Line 1
A nonrecoverable I/O error occurred on file “https://sqlprodbkups.blob.core.windows.net/sqldbbackups1/SQLAuthority.bak:” Backup to URL received an exception from the remote endpoint. Exception Message: The remote server returned an error: (404) Not Found..
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
And here was the command.
BACKUP DATABASE SQLAuthority TO URL='https://sqlprodbkups.blob.core.windows.net/sqldbbackups1/SQLAuthority.bak' WITH CREDENTIAL ='AzBackupCred'
In this case, we again need to look at exception message which is 404 – Not Found.
It didn’t take much time to figure out that the container name which was given in the command was incorrect. The container name should be picked from the Azure portal. We need to go to Home > Storage accounts > sqlprodbkups > Blob service. (our storage account name is sqlprodbkups)
If you re-look at the command which gave an error, we can clearly see that I misspelled the container name (sqldbbackup1 instead of sqldbbackup) to cause the error. Once you pick right name, this exception 404 would disappear.
Reference: Pinal Dave (https://blog.sqlauthority.com)