Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Database Link ORACLE to POSTGRESQL.

Luan HuynhFeb 24 2013 — edited Feb 26 2013
Hi all.
Nice day !
I want to create connection from oracle to postgres.
Here are my configs:
1/ $oracle_home/hs/admin/initPSQL.ora
HS_FDS_CONNECT_INFO = PSQL
HS_FDS_SHAREABLE_NAME = /usr/lib/libodbcpsql.so
set ODBCINI=/etc/odbc.ini

2/ listener.ora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=dg4odbc)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(PROGRAM=dg4odbc)
)
(SID_DESC=
(SID_NAME=PSQL)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/)
(PROGRAM=dg4odbc))
)

3/ tnsname.ora
PSQL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS=(PROTOCOL=TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SID = PSQL)
)
(HS=OK)
)

5/ Driver POSTGRESQL ODBC:
Description=ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so


But when I create database link :

MY QUERY:
|
|
CREATE public DATABASE LINK l test
CONNECT TO "postgres" IDENTIFIED BY "123456"
USING 'PSQL';
SELECT id FROM tb_abc@luanmap_test ;


ERRORS:
|
|
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from LUANMAP_TEST
28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
*Cause: The cause is explained in the forwarded message.
*Action: See the non-Oracle system's documentation of the forwarded
message.
Error at Line: 9 Column: 33

Please help me or give me some advices. Thanks.
Luan !
This post has been answered by Kgronau-Oracle on Feb 26 2013
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 26 2013
Added on Feb 24 2013
34 comments
37,839 views