I am trying to create an external data source in SQL Server to an Azure Storage account. I have created the database scoped credential, but when I execute the CREATE EXTERNAL DATA SOURCE command, I get this:
Msg 105080, Level 16, State 1, Line 7
105080;CREATE EXTERNAL TABLE failed because the URI contains an unsupported path, fragment, user info, or query. Revise the URI and try again.
My create statement looks like this (obviously I have provided the correct container and account, just making it generic here for the sake of security):
CREATE EXTERNAL DATA SOURCE [Blob_CSV]
WITH
(
LOCATION = N'abs://scottpolybasestorage.blob.core.windows.net/polybase',
CREDENTIAL = [BlobStorageCredential]
)
So I am not sure why I am getting the error. I have essentially followed the instructions here:
Thanks in advance.
I have tried several iterations of the CREATE EXTERNAL DATA SOURCE statement, but according to teh documentation, what I have should work.
I have also tried:
CREATE EXTERNAL DATA SOURCE [Blob_CSV]
WITH
(
LOCATION = 'abs://[email protected]/',
CREDENTIAL = [BlobStorageCredential]
)
But same error.
2条答案
按热度按时间roqulrg31#
When creating an external data source for Blob storage in SQL server using the code below:
I encountered the same error as shown below:
I initially used SQL Server 2019, but after updating to SQL Server 2022 , I tried the same code to create an external data source. It executed successfully without any errors, as shown below:
Try using SQL Server 2022 version, and you should be able to create the data source.
qaxu7uf22#
You need to read the documentation regarding SQL Server 2019: https://learn.microsoft.com/en-us/sql/relational-databases/polybase/polybase-configure-azure-blob-storage?view=sql-server-ver15
It states the code must be as follows:
For example, this works for me: