Re: strange DBD::Oracle problem via dbi_link

Re: strange DBD::Oracle problem via dbi_link

am 01.04.2008 12:57:24 von christian.merz

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?
>