in reply to DBI Connection with RAC

You might want to check out DBD::Oracle. Found the following example lines of code from its documentation where the port number is specified:

$dbh = DBI->connect('dbi:Oracle:host=foobar;sid=ORCL port=1521', 'scot +t/tiger', '') $dbh = DBI->connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=(ADDRESS +=(PROTOCOL=TCP)(HOST= foobar)(PORT=1521))(CONNECT_DATA=(SID=ORCL)))}, + "")

Replies are listed 'Best First'.
Re^2: DBI Connection with RAC
by asafp (Novice) on Oct 11, 2010 at 16:09 UTC
    I tried it but it doesn't work.
    Is there another way?

      Unfortunately I don't have Oracle and my experience with it is limited to my very limited exposure to it while taking a database class in college. However, I do have a few ideas.

      The first thing that I would test is to see if the Oracle client can connect from the same system that you're running your Perl code from. If that can't connect, you probably won't be able to connect via Perl or any other language. Also, that test will help verify that you have the Oracle driver installed on your OS.

      Second, make sure that you don't have a firewall blocking the desired port.

      Other than that, I'm not sure what other suggestions that I could offer.

        Thanks for your help!