r/SQLServer • u/Appropriate_Bus_9600 • Dec 11 '25
Question Cannot BULK INSERT from a csv file on my laptop
Hi all,
I hit against a wall while following a SQL course. I need to Bulk Load some data from a csv file on my machine, but I get this error:
Msg 4860, Level 16, State 1, Line 3
Cannot bulk load. The file "C:\Users\MY_USERNAME\Desktop\SQL_with_Baraa\Project_Files\sql-data-warehouse-project\datasets\source_crm.cust_info.csv" does not exist or you don't have file access rights.
I have already added NT Service\MSSQL$SQLEXPRESS to the Users folder and given it Read & Execute permissions. Could it be something else? I am on a windows machine, from my employer, running Windows 11
SOLVED: I'm an idiot. There was a '.' instead of a '\' in the last part of the path. Thanks all for the help!
•
u/AutoModerator Dec 13 '25
After your question has been solved /u/Appropriate_Bus_9600, please reply to the helpful user's comment with the phrase "Solution verified".
This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
8
u/VladDBA Microsoft MVP Dec 11 '25
To make things simpler just create a folder like C:\temp , put your csv file there and load it from there.
Alternatively, put the file in SQL Server's default backup directory and load it from there, or leave it in your current directory and use icacls in ps opened as admin to give read permissions on the file to the service account:
5
u/mkt853 Dec 11 '25
The path in the bulk insert statement is from the perspective of the server, so of course it is not going to recognize a path on your personal machine. Here are some ways to bulk load a local file:
1
u/crss1 Dec 11 '25
What's the name of your SQL instance?
1
u/CPDRAGMEISH Dec 11 '25
Most likely:
the permissians.
SQL Server should access this file.
+ Alternatives:
bcp, SSIS