Database Link ORACLE to POSTGRESQL.
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 !