-1

From what I understand SQL Managed Instance cannot access local or external file share.

We are trying to load data from a file to SQL Managed Instance, wanted recommendations on the best approach for that.

Kumar
  • 11
  • 1

1 Answers1

0

Use BULK INSERT from Azure blob storage https://techcommunity.microsoft.com/t5/Azure-SQL-Database/Loading-files-from-Azure-Blob-Storage-into-Azure-SQL-Database/ba-p/386133

  1. Upload your files to azure storage

  2. Create external data source to that location (put SAS token if it is not public):

CREATE EXTERNAL DATA SOURCE MyAzureBlobStorage 
WITH ( TYPE = BLOB_STORAGE, LOCATION = 'https://myazureblobstorage.blob.core.windows.net'); ```
  1. Load files from this account.
BULK INSERT Product 
FROM 'data/product.dat' 
WITH ( DATA_SOURCE = 'MyAzureBlobStorageAccount'); 
Jovan MSFT
  • 13,232
  • 4
  • 40
  • 55
  • This is for Azure SQL, Not managed instance. I don't think this works in MI at all (still working it out) – Nick.Mc Jul 17 '19 at 00:46