Solved

SQL BULK INSERT error

Posted on 2014-04-09
2
455 Views
Last Modified: 2014-04-10
I execute the following SQL command and get the error seen below. The path and the file specied DOES exist. Does anybody know why I am getting this error?
Thanks in advance for your help.

use Direxxis
BULK INSERT _gpg_filenames FROM 'C:\Documents and Settings\sritsick\My Documents\jsr\Erie_Master\filelist.txt'

Msg 4861, Level 16, State 1, Line 2
Cannot bulk load because the file "C:\Documents and Settings\sritsick\My Documents\jsr\Erie_Master\filelist.txt" could not be opened. Operating system error code 3(The system cannot find the path specified.).
0
Comment
Question by:tesla764
2 Comments
 
LVL 18

Accepted Solution

by:
Jerry Miller earned 500 total points
ID: 39989050
Is SQL Server running on the same machine as the file? If not, SQL is trying to access the c:\ drive on the server. You can move the file there or use the UNC path to access a file on a different computer.

' data_file '  
Is the full path of the data file that contains data to import into the specified table or view. BULK INSERT can import data from a disk (including network, floppy disk, hard disk, and so on).

data_file must specify a valid path from the server on which SQL Server is running. If data_file is a remote file, specify the Universal Naming Convention (UNC) name. A UNC name has the form \\Systemname\ShareName\Path\FileName. For example, \\SystemX\DiskZ\Sales\update.txt.



See this MSDN link.
http://msdn.microsoft.com/en-us/library/ms188365.aspx
0
 

Author Closing Comment

by:tesla764
ID: 39992767
Thanks. Very helpful.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now