|
Posted by Erland Sommarskog on 12/28/05 00:31
(ckirby@mindspring.com) writes:
> After a bit of reading on bcp, it appears that Bulk Insert is a good
> fit for what I am trying to accomplish (and I can run it through
> T-SQL!!)
> But I'm getting an error that seems to indicate that the OS can't find
> the file.
>
> Here's the code I'm using:
> BULK INSERT dbo.tmpPaTimeClock FROM 'C:\Program Files\Traverse
> CWIN\PER_HRS1.CSV'
> Error :
> Server: Msg 4861, Level 16, State 1, Line 1
> Could not bulk insert because file 'C:\Program Files\Traverse
> CWIN\PER_HRS1.CSV' could not be opened. Operating system error code
> 3(The system cannot find the path specified.).
>
>
> That path is on my local machine.. Does Bulk Insert operate from the
> Server box, so the path I enter has to be a path to a folder on the
> machine where the SQL Server is running?
Yes, that's it. SQL Server is a server, and all file specifications are
in the context of the server. If your disk can be reached throgh a UNC
path from the server, it can still read from your box. (Provided that
SQL Server is running under a domain user, I should add.)
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|