Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Using Bulk Insert- Error- file cannot be opened
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 01/30/2013 :  16:52:59  Show Profile  Reply with Quote
I am trying upload a CSV file into SQL Server using the following query:

BULK INSERT intrf_payer_mstr
FROM 'C:\Users\ihsuser\Desktop\edmondson.csv'
WITH (FIELDTERMINATOR=',',rowterminator='\n')

When I attempt to execute, I keep getting an error saying that my query cannot bulk load because the file "C:\Users\ihsuser\Desktop\edmondson.csv" could not be opened. Operating system error code 5 (Access is denied).

Has anyone encountered this problem before, or does anyone know how I can correct this issue? The file is a simple text file and has no blocks or passwords on it.

Any assistance with this would be much appreciated.

Most Valuable Yak

15732 Posts

Posted - 01/30/2013 :  17:03:49  Show Profile  Visit robvolk's Homepage  Reply with Quote
C:\Users\ihsuser\Desktop\edmondson.csv refers to your desktop machine, not the SQL Server's disks. Copy the file to a local drive on the server, or better yet to a file share. Use a UNC path rather than local, e.g. \\computer\path\filename.csv
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000