I am backing up my databases to an Azure blob storage. I am able to backup and restore from maintenance plan. However I am not able to restore databases with script. Below is the T-SQL I am using:
RESTORE DATABASE database_name
FROM URL = 'https://StorageAccount.blob.core/Container/FileName.bak'
WITH CREDENTIAL = 'https://StorageAccount.blob.core.windows.net/Container', STATS = 10
I am getting this error:
Msg 3225, Level 16, State 1, Line 1
Use of WITH CREDENTIAL syntax is not valid for credentials containing a Shared Access Signature.Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Can you please assist?