freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Medi Montaseri" <medi AT resonate.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] testing using tsql
- Date: Thu, 21 Jun 2007 18:44:24 -0700
Actually I just did it...it was pretty easy...I added a -w seconds
option....unit testing shows its working...if you guys want I can check
it in...what is the procedure for that...
Medi
-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Duncan Berriman
Sent: Thursday, June 21, 2007 4:12 PM
To: 'FreeTDS Development Group'
Subject: Re: [freetds] testing using tsql
I am happy to look at writing something simple that will do this. I have
most of the code already it shouldn't be a massive job to put it
together as a tool that can be distributed. If you can wait a few days I
should be able to produce a first cut.
Duncan
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Medi Montaseri
> Sent: 21 June 2007 23:14
> To: FreeTDS Development Group
> Subject: Re: [freetds] testing using tsql
>
>
> For viewers just joining us...the problem statement is
>
> How to run N number of sql request against MS-SQL in a batch mode such
> that each request can be delayed and under control of the user...ie a
> typical development tool...eg run with sleep 2 or run with pause,
> requiring hit-return etc...
>
> Looks like sqlcmd does not like to be used in a batch mode.
> Unless -I is
> (sorry this stupid outlook keeps changing the lower-case I to upper
> case I)...anyways...in which case it just reads the entire input.sql
> file.
>
> I then began looking at bsqldb (on unix) which I can not get to
> work...again my usage is to open a pipe to stdin or bsqldb(1) from
> within a perl script as in "open (PIPE, "| bsqldb -s etc etc")
>
> Is it possible that bsqldb is just broken....what is the confidence
> level on these tools tsql, bsqldb...
>
> I also tried to install DBD::Sybase (as some of the docs mentioned it
> would work with MS SQL) I need two help on this
> - Does DBD::Sybase work with MS SQL ?
> - Installation of DBD::Sybase requires $SYBASE...I don't have such a
> thing...I do have libct.so.4, libsybdb.so.5 and libtds ....(the
> FreeTDS libs pretty match)...does anyone know how to tell configure of
> DBD::Sybase to just use these libs and don't worry about $SYBASE
> stuff...most likely that is what it is looking for anyways..
>
> Thanks...
> Medi
>
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Chris Thomas
> Sent: Thursday, June 21, 2007 9:07 AM
> To: FreeTDS Development Group
> Subject: Re: [freetds] testing using tsql
>
> There is a program/language called expect that works with things that
> have user prompts. Ive used it in the past to telnet into a router to
> get usage stats. Someone wrote a Perl module for expect It is on
> sf.net.
>
> Here are some links
>
> http://sourceforge.net/projects/expectperl
> http://en.wikipedia.org/wiki/Expect
> http://expect.nist.gov/
>
> Chris
>
> On Wed, 2007-06-20 at 18:40 -0700, Medi Montaseri wrote:
>
> > Hi,
> >
> > I am trying to find a way to test an MS SQL engine using
> tsql(1) from
> > a Linux box.
> > My input file has over 47000 SQL statements in it.
> >
> > So I rolled up a perl script to say...
> >
> > my $input = IO::File->new ( "inputfile.sql"); my $output =
> > IO::File->new( "| tsql -H host -P port -U xx -P xxx");
> > $output->autoflush(1);
> >
> > do
> > {
> > $more = $sql = getSql ( $in );
> > sendSql ($out, $sql);
> > # recvResponse(....);
> > sleep(2); # watch some TV, etc
> > } while ( $more );
> >
> > My problem is with my writes to the pipe above. And tsql
> prompts and
> > bunch of error messages...I might have to insert a function called
> > recvResponse() after sendSQL()....and that is where I said, I bet
> > someone has already done this....
> >
> > has anyone cooked up a utilitiy like this....I need to be able to
> > insert sleep between sql requests....that is why I can 'nt use tsql
> > itself Or maybe there is a way ...
> >
> > Thanks
> > medi
> > _______________________________________________
> > 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
>
> --
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.
>
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] testing using tsql,
Medi Montaseri, 06/20/2007
- Re: [freetds] testing using tsql, David Nichols, 06/21/2007
-
Re: [freetds] testing using tsql,
Chris Thomas, 06/21/2007
-
Re: [freetds] testing using tsql,
Medi Montaseri, 06/21/2007
-
Re: [freetds] testing using tsql,
Duncan Berriman, 06/21/2007
- Re: [freetds] testing using tsql, Medi Montaseri, 06/21/2007
- Re: [freetds] testing using tsql, James K. Lowden, 06/21/2007
-
Re: [freetds] testing using tsql,
Duncan Berriman, 06/21/2007
-
Re: [freetds] testing using tsql,
Medi Montaseri, 06/21/2007
- Re: [freetds] testing using tsql, ZIGLIO, Frediano, VF-IT, 06/22/2007
Archive powered by MHonArc 2.6.24.