Skip to Content.
Sympa Menu

freetds - Re: [freetds] Having trouble doing a BULK INSERT

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Wes Gamble <weyus AT att.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Having trouble doing a BULK INSERT
  • Date: Mon, 06 Nov 2006 11:04:07 -0600

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.

Thanks :).

Wes

Wes Gamble wrote:

I just found freebcp - is this the correct/only way to do bulk inserts using freetds?

Thanks,
Wes

Wes Gamble wrote:


All,

Mandriva Linux 10.x
freetds 0.64

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 BULK INSERT?

Thanks,
Wes

================= Output of test ====================

[dusan@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'
2> go
Msg 4860, Level 16, State 1, Server DBSERVE, Line 1
Could not bulk insert. File 'data' does not exist.
1>

=============== Data file ===========================

[dusan@exmit2 lists]$ cat data
jsdf
lkajdsf
lkajdf
lkajdsf
lkajf
wpoieur
oiwur
wer



_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds






Archive powered by MHonArc 2.6.24.

Top of Page