Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'CREATE CREDENTIAL' is not supported in this version of SQL Server - Azure SQL Database

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. 
like image 470
Cesar Avatar asked Feb 16 '26 01:02

Cesar


2 Answers

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.

like image 159
Hello Avatar answered Feb 19 '26 12:02

Hello


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

like image 43
JDA Avatar answered Feb 19 '26 11:02

JDA