Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
@sites = ("sid1", "sid2"); @ips = ("10.10.10.10"); $icnt = 0; $username = "user"; $passwd = "passwd"; foreach $site (@sites) { ################ print "Attempting to connect...\n"; $dbh = DBI->connect('dbi:Oracle:', q{$username/$passwd@(DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST= $ips[$icnt])(PORT=1521)) (CONNECT_DATA=(SID=$site)))}, "") || die "Can't connect vi SQLNET to +Database: $! $site"; print "Connection successful\n"; $dbh->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD Oracle doesn't login?
by valdez (Monsignor) on Oct 24, 2002 at 14:30 UTC | |
|
Re: DBD Oracle doesn't login?
by robartes (Priest) on Oct 24, 2002 at 14:34 UTC | |
|
Re: DBD Oracle doesn't login?
by Jasper (Chaplain) on Oct 24, 2002 at 14:32 UTC |