Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BULK INSERT ERROR 1

Status
Not open for further replies.

stessie

Programmer
Nov 22, 2000
26
IE
Hi
I need to be able to run tbe command BULK INSERT on a file which is held on \\servername\path\file.txt but I keep getting an error returned:
Could not bulk insert because file '\\servername\path\file.txt' could not be opened. Operating system error code 5(error not found).
Which after some research on this siteI have found to be due to the following:
BULK INSERT is a SQL Server command, not OS command, the rights are derived from SQL Server Service startup account. The account that you use to start SQL Server must have permissions on \\server\path\file
Now when I looked up Sql service startup account this is what I found:
How to set the service startup account for SQL Server Agent (Enterprise Manager)
To set the service startup account for SQL Server Agent
Right-click SQL Server Agent; then click Properties.
In the SQL Server Agent Properties dialog box, under Service startup account, select:
System account if your jobs require resources from the local server only.
This account if your jobs require resources across the network, including application resources; you want to forward events to the application logs of other Microsoft® Windows NT® computers; or if you want to notify operators through e-mail or pagers.
If you selected This account, enter the Windows NT account name that SQL Server Agent will use, and then enter the password for the Windows NT account in the Password box.
You must restart SQL Server Agent before these configuration changes take effect.

I am not very well up on Network admin and have contacted the netwrok administrators within the company however they say they don't understand this at all
I really need to get this problem sorted and quickly

Any ideas
;-)

Thanks
 

Here is my simple explanation. In order to access files on another server, the SQL Server startup account must be a DOMAIN account rather than a LOCAL system account.

Ask your network administrators to create a Domain account for SQL Server. It can be the account currently used to start SQL Server or another account. If another account is created, you'll have to change the SQL Server startup parameters. The Network Admins must also grant appropriate permissions on the \\Server\Share\Folder where the data is located.

The SQL Server Agent can start with the same account as SQL Server or another account. If you will be running Jobs with the SQL Agent that require network server access, the SQL Agent account must also be a DOMAIN account with appropriate permissions. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top