none
Cannot bulk load because the file "C:\Temp\bitcoins.csv" could not be opened. Operating system error code (null). RRS feed

  • Question

  • Hi,

    I am trying to do a bulk insert in to SQL Service on Azure from a text file on my local computer. When I run the query in SSMS I get an error "Cannot bulk load because the file "C:\Temp\bitcoins.csv" could not be opened. Operating system error code (null)."

    The error seems to be related to the access rights, but I don't think it's the case as I am watching the C:\Temp folder with ProcessMonitor and don't see any file access events when the script runs. 

    Any recommendations are greatly appreciated! 

    Here is the snippet on the bulk insert code 

    -- Insert into the temp table all records from the text file
    BULK INSERT #coins
    FROM 'C:\Temp\bitcoins.csv'   

    WITH
    (
      FIELDTERMINATOR = '\t' -- Tab delimited
    , ROWTERMINATOR = '\n'
    , FIRSTROW = 2 -- Skip header row
    )

    This thread has some useful info, we are also using SQL authentication. 

    https://stackoverflow.com/questions/14555262/cannot-bulk-load-operating-system-error-code-5-access-is-denied

    • Edited by net_tech Thursday, September 12, 2019 1:42 AM
    Thursday, September 12, 2019 1:34 AM

All replies