DrManhattan has asked for the wisdom of the Perl Monks concerning the following question:
Here's the script output:#!/usr/bin/perl use strict; use DBI; $ENV{ORACLE_HOME} = "/usr/local/oracle9"; my $dbhost = ''; my $database = ''; my $username = ''; my $password = ''; # Build a dsn my $dsn = "DBI:Oracle:host=$dbhost;sid=$database"; # Create a database handle print scalar localtime(), " connecting ...\n"; my $dbh = DBI->connect($dsn, $username, $password, { RaiseError => 0, PrintError => 1, AutoCommit => 0 }) or die $DBI::errstr; print scalar localtime(), " done.\n"; $dbh->disconnect();
Mon Aug 9 10:30:00 2004 connecting ... Mon Aug 9 10:33:09 2004 done.The same code works fine on another Oracle database I'm using, so there appears to be something different about this server. Since Sqlplus connects immediately, though, I have to think there's something I need to do differently on the client side.
-Matt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Oracle hangs at connect
by etcshadow (Priest) on Aug 09, 2004 at 15:01 UTC | |
by DrManhattan (Chaplain) on Aug 09, 2004 at 16:59 UTC | |
|
Re: Oracle hangs at connect
by clscott (Friar) on Aug 09, 2004 at 15:20 UTC | |
by clscott (Friar) on Aug 17, 2004 at 20:25 UTC | |
by Anonymous Monk on Dec 24, 2008 at 04:29 UTC | |
|
Re: Oracle hangs at connect
by hmerrill (Friar) on Aug 09, 2004 at 15:23 UTC |