I am looking to set up my Azure SQL databases to back up to my Azure Blob Storage.
When trying to create the SQL credential with this code:
CREATE CREDENTIAL mycredential
WITH IDENTITY= 'storageaccountname'
, SECRET =
'DefaultEndpointsProtocol=https;AccountName=storageaccountname;AccountKey=8L
==;EndpointSuffix=core.windows.net'
I get this error:
Msg 40514, Level 16, State 1, Line 4
'CREATE CREDENTIAL' is not supported in this version of SQL Server.
The version of SQL is:
SELECT @@VERSION AS 'SQL Server Version'
Microsoft SQL Azure (RTM) - 12.0.2000.8 Jun 11 2017 11:55:10 Copyright
(C) 2017 Microsoft Corporation. All rights reserved.
Stop right there. As far as i can tell, you don't have backup/restore in Azure SQL database, you'd have to use import/export instead. Is that what you are talking about?
Back to the question, CREATE(server-scoped)CREDENTIAL is not supported in Azure SQL database, if you still wish to use credential in Azure SQL database, use CREATE DATABASE SCOPED CREDENTIAL instead.
It seems you are using incorrect key (secret key) in this case. You need to review your Azure container.
https://learn.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With