0
BULK INSERT AlarmServer
FROM 'C:\CSV\Alarm.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO

Can You check the issue

jarlh
  • 42,561
  • 8
  • 45
  • 63
mushu
  • 11
  • 2
  • The C drive is the drive of the SQL Server, not your PC. – mjwills Jul 27 '20 at 14:09
  • Do you have the file open in Excel or some other text editor? – John Cappelletti Jul 27 '20 at 14:16
  • 1
    Does the SQL Server service account have access to that directory? If you're using the default service account, then it won't and you'll need to give it access to said directory. – Thom A Jul 27 '20 at 14:21
  • Does this answer your question? [Sql Bulk Insert -- File does not exist](https://stackoverflow.com/questions/10016799/sql-bulk-insert-file-does-not-exist) – integer Jul 29 '20 at 17:13

1 Answers1

0

I had this same issue, I would create a list of paths in a folder, and loop through them. Out of 139 files, 2 would throw this error. I could open these files, and comparing them to the others that success in being read by bulkload there is no permission difference. Edit and saving them made no difference.
All of this happening on the same machine, local C drive.

I noticed that the 2 offending files had longer names than the others, and renamed them by removing a few white spaces in the file name.

This solved the issue. So in my case it could have been a path length limit issue.

callisto
  • 4,921
  • 11
  • 51
  • 92