Hi all,
I'm trying to connect my local SQL Server database instance to the blob storage emulator as an external connection, however I'm getting a "Bad or inaccessible location specified" error. Here are the steps I'm taking:
CREATE MASTER KEY ENCRYPTION BY PASSWORD = '<password>'; GO -- Create the credentials using the generic storage account key CREATE DATABASE SCOPED CREDENTIAL localBlobStorageCredential WITH IDENTITY = 'devstoreaccount1', SECRET = 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='; GO -- Create the data source pointing to the blob storage location I created (blob-storage-location) CREATE EXTERNAL DATA SOURCE localBlobStorage WITH ( TYPE = BLOB_STORAGE, LOCATION = 'http://127.0.0.1:10000/devstoreaccount1/blob-storage-location', CREDENTIAL= localBlobStorageCredential ); GO -- Attempt to select a file that has been uploaded (cp.json) SELECT * FROM OPENROWSET( BULK 'cp.json', SINGLE_BLOB, DATA_SOURCE = 'localBlobStorage' ) AS j;
I then get the following error:
Bad or inaccessible location specified in external data source "localBlobStorage".
Any ideas?
Regards,
James