develooper Front page | perl.dbi.users | Postings from April 2008

Re: strange DBD::Oracle problem via dbi_link

Thread Previous | Thread Next
From:
Christian Merz
Date:
April 1, 2008 04:00
Subject:
Re: strange DBD::Oracle problem via dbi_link
Hi giedrius,

the ORA-12154 is a typical error when you did not configure your 
tnsnames.ora file on the remote host. Can you connect via SQL*Plus?

But i never tried interconnections of different database syseems. So 
this mitht not help...

cu, Christian

giedrius.liubavicius@gmail.com schrieb:
> Hi all,
> I am desperately trying to link Postgresql with Oracle.
> Everything seems to be working except for one thing: I can't manage to
> get this baindead thing, called oracle working, where postgresql
> client is not on localhost.
> 
> Keep in mind that SQL*Plus, DBI test connecting (from dbi_link)
> WORKS!.
> ORACLE_HOME, NLS_LANG, LANG are set up in /etc/profile.d
> 
> Now, if I try to connect to PgSQL from some remote host and select
> from created views:
> CONTEXT:  SQL statement "SELECT dbi_link.cache_connection( 1 )"
> ERROR:  error from Perl function "remote_select": error from Perl
> function "cache_connection": DBI connect('braindead','user',...)
> failed: ORA-12154: TNS:could not resolve the connect identifier
> specified (DBD ERROR: OCIServerAttach) at line 137 at line 13.
> 
> BUT if the very same PgSQL user, database, query (and so DSN) on the
> localhost gets passed.
> (Query to DBI is executed from PostgreSQL server, not client)
> 
> It seems, DBD::Oracle.pm failes to get environment variables to $ENV,
> so I fixed it to fallback to constant values.
> Everything failes on DBD::Oracle::dr  sub connect, function
> DBD::Oracle::_login(......);
> It seems DBD::Oracle::_login is not a perl function, but rather an
> export from DBD/Oracle/oracle.so
> 
> 
> Any ideas?
> 

Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About