freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Chris Thomas <cwthomas AT llu.edu>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] testing using tsql
- Date: Thu, 21 Jun 2007 09:07:15 -0700
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] 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.