in reply to Re: Database connection over a network without having a local TNS entry
in thread Database connection over a network without having a local TNS entry

Hi Thanks for the reply. I am using Oracle database. Suppose database host is neshat; port is 1521 and database name is abcd. I did it as
$dbh = DBI->connect("dbi:Oracle:database=abcd;host=neshat;port=1521", +$user, $password, {PrintError => 1, RaiseError => 1}) or die "Can't e +xecute statement: $DBI::errstr";
Still it gives me error. Where am I wrong? Thanks for your help.
  • Comment on Re^2: Database connection over a network without having a local TNS entry
  • Download Code

Replies are listed 'Best First'.
Re^3: Database connection over a network without having a local TNS entry
by davidrw (Prior) on Jun 21, 2005 at 01:21 UTC
    So what's the (exact) error message?

    What about the obivous questions of correct user/password values and firewall issues?
      The error message is
      C:\Neshat\Perl-Scripts>perl dbconn.pl DBI connect('database=FO;host=neshat.com;port=1521','abcd',...) failed +: Can't connect using this syntax without specifying a HOST and a SID at dbconn.pl line 9
      I am able to connect using the same parameters using jdbc. So I don't think that there should be any firewall issue. But still I am not very sure.