May 10, 2017 at 5:57 am
Im trying to extract data stored as a csv file in azure blob storage and import it into my main sql database. When I type this
CREATE EXTERNAL DATA SOURCE AzureBlobStorage
WITH ( TYPE = BLOB_STORAGE,
LOCATION = 'location here',
CREDENTIAL= MyAzureBlobStorageCredential
);
I get 'Incorrect syntax near EXTERNAL'
im developing with SQL server express 2012 and my production server is sql server 2012 enterprise. Is it true that this feature is only available with sql server 2016 ? If so and upgrading to 2016 is not possible, what are my options for getting at the blob data in azure ?
July 21, 2017 at 3:15 am
Please remove the Connection String "column encryption setting=enabled" in our SSMS and try it again
July 21, 2017 at 3:22 am
solus - Wednesday, May 10, 2017 5:57 AMIm trying to extract data stored as a csv file in azure blob storage and import it into my main sql database. When I type this
CREATE EXTERNAL DATA SOURCE AzureBlobStorage
WITH ( TYPE = BLOB_STORAGE,
LOCATION = 'location here',
CREDENTIAL= MyAzureBlobStorageCredential
);I get 'Incorrect syntax near EXTERNAL'
im developing with SQL server express 2012 and my production server is sql server 2012 enterprise
CREATE EXTERNAL DATA SOURCE was added in SQL Server 2016, so you will get a syntax error in any lower version, the feature's not there.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 2, 2017 at 6:41 am
One option is to download the file locally then import the file.
Download can be done via powershell
https://docs.microsoft.com/en-us/azure/storage/storage-powershell-guide-full
Or C#
https://blogs.msdn.microsoft.com/webapps/2014/09/24/upload-and-download-files-from-azure-storage/
December 13, 2018 at 11:25 pm
GilaMonster - Friday, July 21, 2017 3:22 AMsolus - Wednesday, May 10, 2017 5:57 AMIm trying to extract data stored as a csv file in azure blob storage and import it into my main sql database. When I type this
CREATE EXTERNAL DATA SOURCE AzureBlobStorage
WITH ( TYPE = BLOB_STORAGE,
LOCATION = 'location here',
CREDENTIAL= MyAzureBlobStorageCredential
);I get 'Incorrect syntax near EXTERNAL'
im developing with SQL server express 2012 and my production server is sql server 2012 enterprise
CREATE EXTERNAL DATA SOURCE was added in SQL Server 2016, so you will get a syntax error in any lower version, the feature's not there.
Hi Gail,
For testing purpose, can I use SQL Server 2012 to connect with my SQL Server 2016 where I have setup PolyBase and want to bring data from a database residing on SQL Server 2012?
I setup the initial work done, PolyBase service is up and running. Executed following:
1- CREATE MASTER KEY
2- CREATE DATABASE SCOPED
3- Getting error on following:
CREATE EXTERNAL DATA SOURCE SQLServerInstance28
WITH (
TYPE = MSSQLSERVER,
LOCATION = 'mySQLServer2012.MyDomain.com',
DATABASE_NAME = 'MyPolyDB',
CREDENTIAL = SQLServerCredentials
)
;
The third script correct parameter I am missing, that is the only problem right now I am facing.
It gives following error:
Incorrect syntax near 'MSSQLSERVER'.
In case of SQL Server, that "TYPE" parameter is required?
Shamshad Ali
December 16, 2018 at 10:36 am
I'm not an Azure user by any means so be gentle, please... Azure doesn't have a BULK INSERT command or OPENROWSET? :blink:
--Jeff Moden
Change is inevitable... Change for the better is not.
December 17, 2018 at 8:30 am
It has both, at least according to the docs. Don't have a SQLDB on hand to try.
https://azure.microsoft.com/en-us/updates/files-from-azure-blob-storage-to-sql-database/
https://azure.microsoft.com/en-us/updates/preview-loading-files-from-azure-blob-storage-into-sql-database/
What it doesn't have is a file system (it's a hosted database, not hosted server), so you import from blob storage via an external data source (created with CREATE EXTERNAL DATA SOURCE).
Edit: That's assuming that by 'Azure', you mean Azure SQLDB and not one of the other myriad of Azure offerings
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 17, 2018 at 8:41 am
GilaMonster - Monday, December 17, 2018 8:30 AMIt has both, at least according to the docs. Don't have a SQLDB on hand to try.https://azure.microsoft.com/en-us/updates/files-from-azure-blob-storage-to-sql-database/
https://azure.microsoft.com/en-us/updates/preview-loading-files-from-azure-blob-storage-into-sql-database/What it doesn't have is a file system (it's a hosted database, not hosted server), so you import from blob storage via an external data source (created with CREATE EXTERNAL DATA SOURCE).
Edit: That's assuming that by 'Azure', you mean Azure SQLDB and not one of the other myriad of Azure offerings
Thanks for the info, Gail. Much appreciated.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply