[freetds] Having trouble doing a BULK INSERT
weyus at att.net
Mon Nov 6 12:04:07 EST 2006
OK, so I see from perusing various other posts that using BULK INSERT
presupposes that the file from which you are inserting data is local to
the database server.
So, my options are to either make that file visible to the database
server (by either copying it there or whatever), or using the command
line utility to do the bulk insert.
Wes Gamble wrote:
>I just found freebcp - is this the correct/only way to do bulk inserts
>Wes Gamble wrote:
>>Mandriva Linux 10.x
>>I'm attempting to perform a BULK INSERT into a SQL Server table.
>>I created a table named "westest" with one column in it, that's a char(10).
>>The output that I get when I attempt to BULK INSERT a valid file that
>>exists in the local directory is below - it's saying that the file
>>doesn't exist. However, this file exists in the local directory with
>>permissions set to 666.
>>Is there something I'm missing here - does freetds support the use of
>>================= Output of test ====================
>>[dusan at exmit2 lists]$ tsql -H DBServe -p 1433 -U webuser -P webusercb
>>locale is "en_US"
>>locale charset is "ISO-8859-1"
>>1> BULK INSERT dbo.westest FROM 'data'
>>Msg 4860, Level 16, State 1, Server DBSERVE, Line 1
>>Could not bulk insert. File 'data' does not exist.
>>=============== Data file ===========================
>>[dusan at exmit2 lists]$ cat data
>>FreeTDS mailing list
>>FreeTDS at lists.ibiblio.org
>FreeTDS mailing list
>FreeTDS at lists.ibiblio.org
More information about the FreeTDS