Is there a way to import Blob files into sql server 2008 other than using CLR ?
The file size is around 300MB so CLR isn't efficient enough. Is there a possibility to use BULK INSERT
or OPENROWSET
in 2008 server?
Example in Sql Server 2017 we can do this
CREATE DATABASE SCOPED CREDENTIAL AzureDevBlobImportCred
WITH IDENTITY = 'SHARED ACCESS SIGNATURE',
SECRET = 'st=2018-12-05T.....'
go
CREATE EXTERNAL DATA SOURCE AzureDevBlobImportExternalSrc
WITH (
TYPE = BLOB_STORAGE,
LOCATION = 'https://myStorageAccount.blob.core.windows.net', -- storage account URL
CREDENTIAL = AzureDevBlobImportCred -- External Data Source
);
then we can use the external data source in bulk import
BULK INSERT #Mytemptable
FROM 'filename'
WITH (DATA_SOURCE = 'AzureDevBlobImportExternalSrc'
);
So do we have something like above to import blob files in Sql Server 2008 ?
Best Answer
Use AzCopy, the Azure Storage Explorer, or even the Azure Portal to download the file to somewhere the SQL Server can read it, then use BCP or BULK INSERT to load it.