in reply to Using a HASH to store a DBI connection
my %db_conn = ( a_manager => ['DBI:Oracle:host=hostname1;sid=ABCDB01;port=1300','a_ +manager','a_manager',], b_manager => ['DBI:Oracle:host=hostname1;sid=ABCDB01;port=1300','b_ +manager','b_manager',], c_manager => ['DBI:Oracle:host=hostname1;sid=ABCDB01;port=1300','c_ +manager','c_manager',], d_manager => ['DBI:Oracle:host=hostname1;sid=CBADB01;port=1300','d_ +manager','d_manager',], ); for my $owner (keys %db_conn) { print "Running $owner stats_table creation\n"; my @data_source = @{ $db_conn{$owner} }; print "@data_source\n"; my $dbh = DBI->connect(@data_source) or die "Couldn't connect to da +tabase: " . DBI->errstr; #.... processing }
"I can cast out either one of your demons, but not both of them." -- the XORcist
|
|---|