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

I am still new to azure and need to migrate on premise databases to azure. I have created a blob storage but for sime reasons, I can't create a credential. See query below:
CREATE CREDENTIAL [https://mystorage.blob.core.windows.net/databases]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE'
, SECRET = '?sv=2018-03-28&ss'
Then, am getting an error below:
Msg 40514, Level 16, State 1, Line 1
'CREATE CREDENTIAL' is not supported in this version of SQL Server.
I have searched many online resources but still nothing has helped me
Is there anything am missing out here? Please help

CREATE CREDENTIAL is only supported in Azure SQL Managed Instance. Azure SQL Database Managed Instance is a fully managed SQL Server Database Engine Instance hosted in Azure cloud. A full feature comparison between Azure SQL and Azure SQL Managed Instance can be found here.

Related

ADF Unable to connect to Synapse Link SQL Pool External Tables

I am trying to create an ADF Linked Service connection to a Synapse Link Serverless SQL Pool connected to ADSL Storage. I can successfully get a connection but when I try and use a dataset to access the data I get a permission issue.
I can successfully access the data via Synapse studio :
This is the error I get when I use the data set in ADF.
I can also look at the schemas in SSMS , where they appear as External tables. But get a similar credential error at the same point.
Has anyone come across this issue please ?
There are a few pieces of information you haven’t supplied in your question but I believe I know what happened. The external table worked in Synapse Studio because you were connected to the Serverless SQL pool with your AAD account and it passed through your AAD credentials to the data lake and succeeded.
However when you setup the linked service to the Serverless SQL Pool Im guessing you used a SQL auth account for the credentials. With SQL auth it doesn’t know how to authenticate with the data lake so looked for a server scoped credential but couldn’t find one.
The same happened when you connected from SSMS with a SQL auth account I’m guessing.
You have several options. If it’s important to be able to access the external table with SQL auth you can execute the following to tell it how to access the data lake. This assumes the Synapse Workspace Managed Service Identity has Storage Blob Data Reader or Storage Blob Data Contributor role on the data lake.
CREATE CREDENTIAL [https://<YourDataLakeName>.dfs.core.windows.net]
WITH IDENTITY = 'Managed Identity';
Or you could change the authentication on the linked service to use the Managed Service Identity.

Connecting from Azure Databricks to Azure SQL using User Managed Identity

I am trying to read data on an Azure SQL instance from an Azure Databricks workspace, avoiding using username/password personal credentials for automated, regular data fetch & analysis. I thought using a managed identity would do the job, however it looks to be less smooth than with Azure Functions or Web Services. Is this supported in Databricks?
I would need environment variables that do not exist in the Databricks instance, like IDENTITY_ENDPOINT and IDENTITY_HEADER, following the doc https://learn.microsoft.com/en-us/azure/app-service/overview-managed-identity
Any insight would be greatly appreciated!

Azure Data Factory Error code":9056,"message":"Cannot connect to SQL Server"

I am trying to copy a file data from Azure Blob storage to Azure SQL DB just for my learning. I cannot able to create the linked service for Azure SQL db destination as it is giving the error. I can able to connect fine from my local SSMS to the Azure SQL server but not from AZURE data factory. I turned on Allow access to Azure services. I am using the default integration runtime (AutoResolveIntegrationRuntime). I also did Add client IP by adding my current IP address to the rule list
Try using an Azure Integration Runtime with the same region as the SQL server. Sometimes the auto resolve cannot reach the sql server.
Hope this helped!

Azure restore a SQL Server database from blob

I am trying to restore a SQL Server database in Azure from a database backup file stored in a blob. I have followed this link but got this error
TITLE: Microsoft SQL Server Management Studio
An error occurred while loading data.
ADDITIONAL INFORMATION:
The type of a blob in the container is unrecognized by this version. (Microsoft.SqlServer.StorageClient)
The remote server returned an error: (409) Conflict. (System)
I have also tried this:
CREATE CREDENTIAL mycredential1
WITH IDENTITY= 'jjt', -- this is the name of the storage account you specified when creating a storage account
SECRET = 'storage account key'
Then try to use the credential to restore the sql db from the azure blob, but failed on the above step with the following error:
Msg 40514, Level 16, State 1, Line 1
'CREATE CREDENTIAL' is not supported in this version of SQL Server.
What is the correct way?
You cannot use CREATE CREDENTIAL on Azure SQL Database, you need to create a CREATE DATABASE SCOPED CREDENTIAL as shown below:
CREATE DATABASE SCOPED CREDENTIAL UploadInvoices
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'QLYMgmSXMklt%2FI1U6DcVrQixnlU5Sgbtk1qDRakUBGs%3D';
For more information, please read this article.
Additionally, you cannot restore a native SQL Server backup into an Azure SQL Database. The article you are making reference is restoring a bacpac. You can restore a bacpac into an Azure SQL Database.
Please create a bacpac of your SQL Server (on-premises) database using Microsoft SQL Server Management Studio (SSMS), make a right click on the database, choose Tasks, then choose Export Data-tier Application to create the mentioned bacpac. Once the bacpac has been created you can then import it to Azure SQL Database as a new database.
A better method to migrate your database from a SQL Server instance to Azure SQL database is using the latest version of Data Migration Assistant which you can download from here. This tool would perform an assessment of your SQL Server assessment, it will let you know about any adjustments you need to make to make the database compatible to Azure SQL Database. If the database is compatible, the tool will migrate the database to an Azure SQL Database logical server.

Is it possible to restore a deleted Sql Server instance in Azure?

I recently deleted a SQL server instance (with 2 sql databases) on my azure portal. I would like to know if there is a way for me to restore the deleted SQL server and the corresponding Sql databases.
I would appreciate any help/direction in this regard.
Thanks
Uma
When you delete SQL Server from portal, you will get a warning : Warning! Deleting xxx is irreversible. So the best solution to this is to open a support ticket.
You could also refer to Can we recover a deleted server for Azure SQL Database? for more information.
Microsoft might be able recover the databases under these conditions:
Another SQL Server with the same name was NOT created
Less than 7 days passed since the deletion
The Region, SQL Server and Resource Group name must be known
You need to log a support ticket. If the server can be recovered, it will be restored. The databases were not restored in my case, but could be recovered using the normal method for recovering a deleted SQL Database within a SQL server.
I was able to restore an sql server by contacting MS support through a support ticket in the Azure portal.
Key things that must be available:
The name of the Sql server and database
The resource group name and time of deletion.
You should not have created another sql server resource with the same name in an attempt to recover the sql server.
I had an ARM template of the resource group that I exported from the portal. Without this I would not have remembered the names of the resources above.
Key takeaways:
Ensure that users that is not the subscription holder cannot delete resources.
Export ARM templates for all RG's - this saved my b**.
Thanks to the MS team for helping me out so quickly! They helped me out within an hour! Great service!

Resources