0

I am running MS SQL Server 2017 in Docker on Mac OSX. I was able to connect from IntelliJ IDEA via Data source. Now, I want to do BULK INSERT to load 2+ million rows into DB.

Bulk insert from SQL Server documentation I am trying to adapt:

BULK INSERT [dbo].[SOCKS]
FROM 'mssql.csv'
WITH (FORMAT='CSV');

I constantly get this error:

[S0001][4860] Cannot bulk load. The file "mssql.csv" does not exist or you don't have file access rights.

As far as I read responses on StackOverflow and SQL Server it relates to file access.

My file privileges look:

$ ls -lt
-rw-r--r--  1 dmytro  staff       1049 Jun 23 10:37 mssql.csv
  • I read about the mechanism of checking the path via SQL Function but couldn't make it work.

  • I tried the full path for the file in Unix and Windows format such /User/name/mssql.csv and \\User\name\mssql.csv and got the same issue as one above.

Am I doing anything wrong? How to do a bulk insert in this case?

Dmytro Chasovskyi
  • 3,209
  • 4
  • 40
  • 82

0 Answers0