Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How can I change my script to make multiple connections to do the job

by NetWallah (Abbot)
on Jan 10, 2013 at 18:20 UTC ( #1012714=note: print w/ replies, xml ) Need Help??


in reply to How can I change my script to make multiple connections to do the job

This meets your specifications:

my $conn = 20; my @dbh = map { DBI->connect ('DBI:Oracle:host=EM12;sid=orcl',"hr","hr +") or die "Failed to connect to database: " . DBI->errstr} 1..$co +nn; for my $t (1..$tables){ my $sql = .... $dbh[$t % $conn]->do ($sql) or die DBI->errstr; }
What this achieves is less clear.

             "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius


Comment on Re: How can I change my script to make multiple connections to do the job
Download Code
Replies are listed 'Best First'.
Re^2: How can I change my script to make multiple connections to do the job
by terrykhatri531 (Novice) on Jan 10, 2013 at 20:29 UTC

    Hi,

    This is excellent, I love this forum, and thank you very much for your help.

    Regards

    Terry

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012714]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (14)
As of 2015-07-31 18:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls