Solved

SQL BULK INSERT error

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

770 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