in reply to Oracle hangs at connect

I find that the form specifying host is prone to taking long times to connect.

Set up your TNS names file approriately ($ORACLE_HOME/network/admin/tnsnames.ora) and use the form:

$dsn = "dbi:Oracle:$database";

--
Clayton

Replies are listed 'Best First'.
Re^2: Oracle hangs at connect
by clscott (Friar) on Aug 17, 2004 at 20:25 UTC

    I'm following up to myself because I think someone has discovered the cause.

    Unless you specify which port Oracle is listening on it will try port 1526 first, which would explain a long delay in waiting for a response before trying the more standard port of 1521.

    my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid;port=$port");

    Source: http://use.perl.org/~jdavidb/journal/20440

    --
    Clayton
      this is realy good answer. its worksfine Thanks