Solved

SQL BULK INSERT error

Posted on 2014-04-09
2
469 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 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
EF5 How do I stop pre-compiled views? 8 54
Remove () 10 41
T-SQL: Wrong Result 7 39
STUFF function - proper use to update column? 6 16
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

739 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