Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL BULK INSERT error

Posted on 2014-04-09
2
Medium Priority
?
473 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

704 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