[Webinar] Streamline your web hosting managementRegister Today


"Could not bulk insert because file '\\server\<path>\file.txt' could not be opened. Operating system error code 5(Access is denied.)."

Posted on 2010-04-06
Medium Priority
Last Modified: 2013-12-27
I have been using BULK INSERT to get the data from text file with  Sql server 2k and SP3.
Recently we have replaced  our server, so we installed fresh sql server 2k with SP4.
All of sudden our it stopped working. It is giving the error following error message

"Could not bulk insert because file '\\server\<path>\file.txt' could not be opened. Operating system error code 5(Access is denied.)."

I made srue about
1. SQL Server service account is under domain accounts
2. Shared folder has been given rights
3. Login is added to Bulk insert administrator

Please post your thoughts.....thanks.
Question by:GulfIT
LVL 24

Accepted Solution

B H earned 1500 total points
ID: 29904257
where the file.txt lives at, check the share permissions (you said you did) but also check the FILE permissions - they're different...

also check the folder permissions where the file lives at.

you can check the event logs on both machines to see what user account is being used (and failing) and make sure that's the one that has the rights you need

are you able to do  start > run > \\server\path\file.txt  and open it?  if so, it is shared properly, but you need to verify what user account the script runs as, and the permissions where the file lives


Author Closing Comment

ID: 32016866

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question