Skip to Content.
Sympa Menu

freetds - Re: [freetds] what's wrong with this freebcp statement?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "blackwater dev" <blackwaterdev AT gmail.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] what's wrong with this freebcp statement?
  • Date: Thu, 16 Mar 2006 22:58:52 -0500

James,

If I use bcp for everything else, is there another way via freetds to
somehow move the blob data from the sql server to a local MySQL db without
using bcp?

I just installed sqsh and am not trying to go through the docs on it but it
would be really nice just to be able to use freetds.

Thanks,
Eddie

On 3/16/06, blackwater dev <blackwaterdev AT gmail.com> wrote:
>
> Thanks James,
>
> Unfortunately I need the blobs as I am downloading real estate info and
> the blobs hold the property photos. I really wish I didn't though as
> everything else works great except for that.
>
> Eddie
>
>
> On 3/16/06, James K. Lowden <jklowden AT freetds.org> wrote:
> >
> > blackwater dev wrote:
> > > I just looked in the out file and it seems to start to put out one row
> > > then fail. It fails right before it outputs the blob column which is
> > > used to hold images.
> >
> > That makes sense. :-/ I might have guessed.
> >
> > For a long time, there was no bcp for text/image data and, looking at
> > the
> > current code, I find no special treatment for image data. I can easily
> > imagine we exhaust virtual memory when we copy the buffer.
> >
> > I don't like that it rolls over on you, though. You should get an out
> > of
> > memory error. Well, you should really get data....
> >
> > > Thanks!
> >
> > You're welcome? If you don't need the blobs, great. If you do, maybe
> > sqsh (www.sqsh.org) will do the trick. It has bcp functions, too.
> >
> > Regards,
> >
> > --jkl
> >
> > > On 3/16/06, blackwater dev <blackwaterdev AT gmail.com > wrote:
> > > >
> > > > I set my MALLOC_DEBUG var to 0 and now I just get segmentation
> > fault.
> > > >
> > > > James, I dumped out the log as you said, it seems to connect as I do
> > > > see the columns and seems to send and receive several
> > headers/packets
> > > > and then just seems to dy doing a ton of dbconverts():(this is just
> > a
> > > > small number as there were a ton of these).
> > > >
> > > > 13:30:43.838968 dbconvert(39 [SYBVARCHAR] len 129 => 47 [SYBCHAR]
> > len
> > > > -1) 13:30:43.839027 dbconvert() calling tds_convert
> > > > 13:30:43.839107 dbconvert() called tds_convert returned 129
> > > > 13:30:43.839168 dbconvert() outputting 129 bytes character data
> > > > destlen = -1
> > > > 13:30:43.839231 dbconvert(34 [SYBIMAGE] len 4096 => 47 [SYBCHAR] len
> > > > -1) 13:30:43.839294 dbconvert() calling tds_convert
> > > > 13:30:43.839453 dbconvert() called tds_convert returned 8192
> > > > 13:30:43.839516 dbconvert() outputting 8192 bytes character data
> > > > destlen = -1
> > > >
> > > > This table that I am pulling from has about 11000 rows.
> > > >
> > > > I can send the log file also.
> > > >
> > > >
> > > >
> > > > Thanks!
> > > > Eddie
> > > >
> > > >
> > > >
> > > >
> > > > On 3/16/06, michael.peppler AT bnpparibas.com
> > > > <michael.peppler AT bnpparibas.com> wrote:
> > > > >
> > > > > That's a malloc/free error, and is internal to glibc. You might be
> > > > > able to
> > > > > get more information by setting the MALLOC_DEBUG env. variable
> > > > > (check the
> > > > > man page for malloc(3))
> > > > >
> > > > > Michael
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Internet
> > > > > blackwaterdev AT gmail.com@lists.ibiblio.org - 16/03/2006 03:48
> > > > >
> > > > >
> > > > > Please respond to freetds AT lists.ibiblio.org
> > > > >
> > > > > Sent by: freetds-bounces AT lists.ibiblio.org
> > > > >
> > > > > To: freetds
> > > > >
> > > > > cc:
> > > > >
> > > > >
> > > > > Subject: Re: [freetds] what's wrong with this freebcp
> > statement?
> > > > >
> > > > >
> > > > > Hey James,
> > > > >
> > > > > I commented out this section in the conf file and added my ip
> > info.
> > > > > I then
> > > > > ran the freebcp command again and now get this error:
> > > > >
> > > > > *** glibc detected *** double free or corruption: 0x09eca740 ***
> > > > >
> > > > > Googled it but didn't find much...what's wrong?
> > > > >
> > > > > Thanks!
> > > > >
> > > > >
> > > > > # A typical Microsoft SQL Server 2000 configuration
> > > > > [MyServer2k]
> > > > > host = 99.99.999.99
> > > > > port = 1433
> > > > > tds version = 8.0
> > > > >
> > > > > On 3/15/06, Lowden, James K < james.k.lowden AT alliancebernstein.com
> > >
> > > > > wrote:
> > > > > >
> > > > > > > From: blackwater dev
> > > > > > > Sent: Wednesday, March 15, 2006 2:13 PM
> > > > > > >
> > > > > > > I need to connect to a remove SQL server and grab all the data
> >
> > > > > > > from a view. here is what I am using (of course I have
> > changed
> > > > > > > names and ip addresses):
> > > > > > >
> > > > > > > freebcp databasename.viewname out data.sql -U username -P
> > mypass
> > > > > > > -S 999.99.999.99 :1433 -n
> > > > > > >
> > > > > > > I know the credentials are good because I can connect via php
> > > > > > > but when run, I get this:
> > > > > > >
> > > > > > > Msg 208, Level 16, State 1 Server 'MIRROR', Line 1
> > > > > > > Invalid object name ' databasename.viewname'.
> > > > > > > Msg 20018, Level 5 General SQL Server error: Check messages
> > from
> > > > > > > the SQL Server.
> > > > > > >
> > > > > > > Error in dbnumcols
> > > > > > >
> > > > > > > What am I doing wrong?
> > > > > >
> > > > > > Set up your freetds.conf correctly for your server. Be sure to
> > > > > > use
> > > > > TDS
> > > > > > version 8.0 (or 7.0).
> > > > > >
> > > > > > When you use "-S 999.99.999.99:1433", you bypass freetds.conf
> > > > > . FreeTDS
> > > > > > has to guess the protocol, meaning it falls back on its
> > > > > > compiled-in defaults. That default is probably TDS 4.2 (cf.
> > "tsql
> > > > > > -C"), which (as mentioned in the freebcp manpage) is a no-no for
> > > > > > BCP.
> > > > > >
> > > > > > Also, don't use the "-n" option. You're going to load these
> > data
> > > > > > into
> > > > >
> > > > > > MySQL, yes? Then you probably want character data, a text file,
> > > > > > probably tab-delimited. Use "-c" instead.
> > > > > >
> > > > > > 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
> > > > > > e-mail
> > > > > > 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 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
> > > > >
> > > > >
> > > > >
> > > > > This message and any attachments (the "message") is
> > > > > intended solely for the addressees and is confidential.
> > > > > If you receive this message in error, please delete it and
> > > > > immediately notify the sender. Any use not in accord with
> > > > > its purpose, any dissemination or disclosure, either whole
> > > > > or partial, is prohibited except formal approval. The internet
> > > > > can not guarantee the integrity of this message.
> > > > > BNP PARIBAS (and its subsidiaries) shall (will) not
> > > > > therefore be liable for the message if modified.
> > > > >
> > > > > ---------------------------------------------
> > > > >
> > > > > Ce message et toutes les pieces jointes (ci-apres le
> > > > > "message") sont etablis a l'intention exclusive de ses
> > > > > destinataires et sont confidentiels. Si vous recevez ce
> > > > > message par erreur, merci de le detruire et d'en avertir
> > > > > immediatement l'expediteur. Toute utilisation de ce
> > > > > message non conforme a sa destination, toute diffusion
> > > > > ou toute publication, totale ou partielle, est interdite, sauf
> > > > > autorisation expresse. L'internet ne permettant pas
> > > > > d'assurer l'integrite de ce message, BNP PARIBAS (et ses
> > > > > filiales) decline(nt) toute responsabilite au titre de ce
> > > > > message, dans l'hypothese ou il aurait ete modifie.
> > > > >
> > > > > _______________________________________________
> > > > > 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
> > _______________________________________________
> > 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