freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] freebcp is free but I can't make it work
- From: "Lowden, James K" <LowdenJK AT bernstein.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] freebcp is free but I can't make it work
- Date: Wed, 21 Sep 2005 17:58:14 -0400
> From: bpollard AT micron.com
> Sent: Wednesday, September 21, 2005 4:28 PM
>
> Has anyone used freebcp on Solaris? I am migrating a fairly large job
> to MSSQL and I did not want to re-write it in perl, so I took the
> shell code and replaced isql with tsql, then found freebcp to replace
> bcp. The only problem is that freebcp does not load the data nor
> produce an error file. Any ideas?
>
> unix$ cat /var/tmp/test.out
> 1 2
> 3 4
> 5 6
> 7 8
> 9 0
>
> MSSQL$ create table test (a char(10), b char(10))
> MSSQL$ grant insert on test to public
>
> /mu/sdk/freetds/0.61.2/bin/freebcp temp_bcp..test in /var/tmp/test.out
> -c -b 2 -UDBA_SA -Ppwdnotlisted -SBOMSSDEVL19 -e /var/tmp/test.err
>
> Starting copy...
>
> 0 rows copied.
>
> unix$ ls -ltr /var/tmp/test.err
> /var/tmp/test.err: No such file or directory
Suggestion 1: upgrade. Use 0.63. freebcp with 0.61 did not write error
files. IIRC the man page says so? I remember making several fixes to
the bcp library during 0.62.
Suggsetion 2: put a tab character between your columns.
$ hexdump -C t
00000000 31 09 32 0a 33 09 34 0a 35 09 36 0a 37 09 38 0a
|1.2.3.4.5.6.7.8.|
00000010 39 09 30 0a |9.0.|
Definitely it's not a Solaris issue and definitely FreeTDS works on
Solaris. Sometimes, though, with bcp you may find the error messages a
bit obscure or misleading. Setting TDSDUMP is your first resort,
unfortunately.
HTH.
--jkl
-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.
-
[freetds] freebcp is free but I can't make it work,
bpollard, 09/21/2005
- <Possible follow-up(s)>
- Re: [freetds] freebcp is free but I can't make it work, Lowden, James K, 09/21/2005
Archive powered by MHonArc 2.6.24.