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!

Connecting Oracle 11gr2 to postgresql 9.1 hetrogenous error

Red8Nov 19 2011 — edited Nov 22 2011
hi all. i have been trying to connect Oracle 11gr2 to PostgreSQL 9.1 and it is throwing errors. Here are the configuration files.

initpost.ora :

# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC

#
# HS init parameters
#
HS_FDS_CONNECT_INFO = post
HS_FDS_TRACE_LEVEL = on



#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>


listener.ora :


# listener.ora Network Configuration File: C:\app\Red8\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Red8\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Red8\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)

SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=post)
(ORACLE_HOME=C:\app\Red8\product\11.2.0\dbhome_1)
(PROGRAM=dg4odbc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.114)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

ADR_BASE_LISTENER = C:\app\Red8



tnsnames.ora

# tnsnames.ora Network Configuration File: C:\app\Red8\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

post =
(DESCRIPTION=
(ADDRESS = (PROTOCOL = tcp)(HOST = 192.168.0.114)(PORT = 1521))
(CONNECT_DATA =
(SID = post)
(SERVER = DEDICATED)
)
(HS=OK)
)


Database link creation goes as follows

SQL> create public database link PG connect to "eepco" identified by "eepco" using 'post';

Database link created.


And tnsping also works fine


C:\app\Red8\product\11.1.0\db_1\BIN>tnsping post

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 19-NOV-2
011 17:46:02

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Used parameter files:
C:\app\Red8\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS = (PROTOCOL = tcp)(HOST = 192.168.0
.114)(PORT = 1521)) (CONNECT_DATA = (SID = post) (SERVER = DEDICATED)) (HS=OK))
OK (0 msec)




now the problem when i try to select data from postg table it throws this error

SQL> select * from postg@PG;
select * from postg@PG
*
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified {IM002}
ORA-02063: preceding 2 lines from PG


SQL>


please help as this is a pilot for an up coming Project.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 20 2011
Added on Nov 19 2011
10 comments
1,959 views