RE: Help with my perl script



This is not really a DBI question, because, although your testing is
over DBI, the capabilities you're asking about concern elementary Perl.

Try

$ man perlfunc

and you will see there is a fork() function available standard in Perl
that lets you run multiple copies of the same code as separate
processes. The child code can then connect to DBI and run your testing
suite.

-Will

-----Original Message-----
From: joe bayer [mailto:joebayerii@xxxxxxxxx]
Sent: Wednesday 23 August 2006 14:05
To: dbi-users@xxxxxxxx
Subject: Help with my perl script


Group,

I am trying to write a load testing script.

The script goes like this:
++++++++++++++++++++++++++++++++++
my $j = 0;
while ($j < 300)
{
$dbh[$j] = DBI->connect ( "dbi:Oracle:$instance[$i]",
"$username[$i]",
"$passwd[$i]",
{
PrintError => 1,
RaiseError => 1,
AutoCommit => 1
}
) || die "Database Connection not made
$DBI::errstr" ;# Create a Database
#do some random, endless select statement here.
$j++;
}
++++++++++++++++++++++++++++++++++++++++++

What I want is 300 session do the select statement
simultaneously. But this script will do one session after another.

Do I REALLY have to start 300 perl script in order to this
testing, or there is some way in perl that one script can
start up 300 session and do their invidual select simultaneously?

Thanks for your help.

Joe


---------------------------------
All-new Yahoo! Mail - Fire up a more powerful email and get
things done faster.



- - - - - Appended by Scientific Atlanta, a Cisco company - - - - -
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.

.



Relevant Pages

  • Re: Apache, Oracle, Perl DBI Problems
    ... I believe at the start of every perl cgi script interfacing ... 'perl dbi oracle'. ...
    (perl.dbi.users)
  • InterBase MEMO/BLOB fields, data with size > 1MB
    ... my Perl script I have a code part that fetches a data from database ... Scriptwork just fine if the "content" in MEMO or BLOB ... DBD-InterBase with some other Perl module? ... "The DBI currently defines no way to insert or update LONG/LOB values ...
    (perl.dbi.users)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-10-23 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)