Mojatba
Mojatba

Reputation: 39

Connecting Oracle to SQL server using dg4odbc

apologies if this question has already been asked, i just couldn't find the answer to my case. I'm trying to make a connection (link) between Oracle 11g MS SQL database which are on 2 different servers. I've followed the instruction on this link

http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm

Only that in my listener on SQL server, I'm using DG4ODBC rather than hsodbc

i've listed the steps below, but i can't figure out how to resolve it.

1) installed oracle client on my SQL server. 2) created an ODBC (64 bit) connection in the SQL server to point to my SQL target database called dg4odbc 3) Created file called initdg4odbc.ora in

D:\app\user\product\11.2.0\client_2\hs\admin with the below content:

# HS init parameters
#
HS_FDS_CONNECT_INFO = dg4odbc
HS_FDS_TRACE_LEVEL = on

4) Updated my listener to be as below:

LISTENER =
(ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=sqlserver)(PORT=1521))
)
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=dg4odbc)
         (ORACLE_HOME=D:\app\user\product\11.2.0\client_2)
         (PROGRAM=dg4odbc)
      )
  )

#CONNECT_TIMEOUT_LISTENER = 0

5) when I stop and start the listener, I get the below message:

Instance "dg4odbc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

6) on my Oracle database server, updated the tnsnames.ora file to include:

dg4odbc.world = (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)
               (HOST = sqlserver)
               (PORT = 1521)
          )
          (CONNECT_DATA = (SID=dg4odbc)
          )
          (HS=OK)
     )

7) when I try to ping the tns using : tnsping dg4odbc I get the following error:

Used parameter files:
E:\oracle\product\11.2.0.4\dbhome_1\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name

Could you please tell me where I am going wrong? Im getting a bit desperate to get this connection to work.

really appreciate your help on this.

Thanks

Upvotes: 2

Views: 4312

Answers (0)

Related Questions