I am trying to reference remote PostgreSQL tables from an Oracle instance. I am trying to use heterogeneous services to do this. I have created an odbc link to the remote database that is confirmed working (I used isql). Here is my tnsnames.ora: # tnsnames.ora Network Configuration File: /opt/oracle/product/11gR1/db/network/admin/tnsnames.ora # Generated by Oracle configuration tools. LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = dbs1)(PORT = 1522)) ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbs1)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) REMOTEDB= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=dbs1) (PORT=5432) ) (CONNECT_DATA= (SID=REMOTEDB) ) (HS=OK) ) Here is my listener.ora: # listener.ora Network Configuration File: /opt/oracle/product/11gR1/db/network/admin/listener.ora # Generated by Oracle configuration tools. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST= (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522)) (ADDRESS = (PROTOCOL = TCP)(HOST = dbs1)(PORT = 1522)) (ADDRESS = (PROTOCOL = TCP)(HOST = dbs1)(PORT = 5432)) ) ) ) ADR_BASE_LISTENER = /opt/oracle SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (SID_NAME=REMOTEDB) (ORACLE_HOME=/opt/oracle/product/11gR1/db) (PROGRAM=dg4odbc) (ENVS=LD_LIBRARY_PATH=/usr/lib64:/opt/oracle/product/11gR1/db/lib) ) ) TRACE_LEVEL_LISTENER = 0 LOGGING_LISTENER = off Here is my initREMOTEDB.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 = REMOTEDB HS_FDS_TRACE_LEVEL = 0 #HS_FDS_TRACE_FILE_NAME = /tmp/oracle_trace_host_143 HS_FDS_SHAREABLE_NAME = /usr/lib64/psqlodbcw.so HS_FDS_SUPPORT_STATISTICS = FALSE # # ODBC specific environment variables # set ODBCINI=/etc/unixODBC/odbc.ini # # Environment variables required for the non-Oracle system # #set <envvar>=<value> Here are the results from tnsping REMOTEDB: TNS Ping Utility for Linux: Version 22.214.171.124.0 - Production on 18-JUL-2011 16:17:17 Copyright (c) 1997, 2009, Oracle. All rights reserved. Used parameter files: /opt/oracle/product/11gR1/db/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=dbs1) (PORT=5432)) (CONNECT_DATA= (SID=REMOTEDB)) (HS=OK)) OK (0 msec) However, when I execute the following SQL, create public database link odbc_bridge_to_remote_db connect to "definitely_correct_username" identified by "definitely_correct_password" using 'REMOTEDB'; select * from "correctly_spelled_and_formatted_name_of_existing_table"@odbc_bridge_to_remote_db; I receive the following error: [Err] ORA-12154: TNS:could not resolve the connect identifier specified Does anyone know why? I have tried what feels like every combination of parameters and so I thought this is probably as good a broken place to start as any.