Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL BULK INSERT error

Posted on 2014-04-09
2
Medium Priority
?
476 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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

885 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