See below.

[EMAIL PROTECTED] [[EMAIL PROTECTED]] wrote:
> I want connect to a oracle database with a connect string in the form:
> 
> dbi:Oracle:host=my_host;sid=my_sid;port=1521
> 
> This failes with a the real hostname, but it works with IP-address of
> the
> host.
> Curious enough, a nslookup for this machine works too!
> There is a entry in /etc/hosts for this machine.
> 
> I can also connect to this database from another host with exact the
> same
> kind of connect string. In this case the connect works with both,
> the real name and IP address.
> I think it is a DNS problem, but why the nslookup work?
> 
> I attach a debug session:
> 
> Name "main::ORACLE_HOME" used only once: possible typo at test_dbi.pl
> line 4.
> main::(test_dbi.pl:4):  $ORACLE_HOME='/opt/oracle/product/8.1.7';
>   DB<1> n
> main::(test_dbi.pl:7):  my $dbh =
> DBI->connect('dbi:Oracle:host=my_host;sid=my_sid;port=1521',"nutzer","pw")
>   DB<1> n
> DBI->connect(host=my_host;sid=my_sid;port=1521) failed: ORA-12541:
> TNS:no listener (DBD ERROR: OCIServerAttach) at test_dbi.pl line 7
  ^^^^^^^^^^^^^^^
Did you make sure the Oracle Listener is up and running?  If it
is up and running, verify your SQLnet settings(tnsnames?).

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

>         Carp::carp('DBI->connect(host=my_host;sid=my_sid;port=1521)
> failed: ORA-12541: T...') called at /opt/perl5/lib/site_perl/DBI.pm
> line 412
>         DBI::connect('DBI',
> 'dbi:Oracle:host=my_host;sid=my_sid;port=1521', 'nutzer', 'pw') called
> at test_dbi.pl line 7
> Can't connect to 1st Oracle database: ORA-12541: TNS:no listener (DBD
> ERROR: OCIServerAttach)
> 
> every help appreciate
> thomas
> 
> -- 
> PALOMA-system is a treasure, hanger or large item and stored in the wrong area (Loc. 
>1/K/99/91/1)

Reply via email to