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!

Oracle to sql server using Oracle gateway

Arif2018Sep 2 2020 — edited Sep 12 2020

i am trying to create dblink using oracle gateway, i followed the steps as below.

1.Installed  oracle gateway 12

2.Chosen the oracle odbc gateway

3.Created the new listerner listener_gtw and a seperate port 1526 different from the current one.

4.modified the init file in gateway home.

# 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 = Culligan_Dev

HS_FDS_TRACE_LEVEL = OFF

#

# Environment variables required for the non-Oracle system

#

#set <envvar>=<value>

5. In the gateway home modified the listener file to add the following new listener and port details.

SID_LIST_LISTENER_GTW =

   (SID_LIST=

      (SID_DESC=

         (SID_NAME=Culligan_Dev)

         (ORACLE_HOME=D:\app\tg\administrator\product\12.1.0\tghome_1\BIN\)

         (PROGRAM=dg4odbc)

      )

   )

6.Restarted the listener

7.Modified the tnsnames.ora inside the database home folder as follows.

Culligan_Dev =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = ERP-TEST2.Culligan.ae)(PORT = 1526))

    (CONNECT_DATA = (SERVICE_NAME = Culligan_Dev) )

    (HS=OK)

  )

8.Created the dblink with data source name given in odbc connection.

CREATE PUBLIC DATABASE LINK SQLS
CONNECT TO "sa" IDENTIFIED BY "pwd@23"
USING 'Culligan_Dev';

When i am executing the sql statement i am getting the following error.

[code]

SQL> select * from dual@sqls;

select * from dual@sqls

                   *

ERROR at line 1:

ORA-28545: error diagnosed by Net8 when connecting to an agent

Unable to retrieve text of NETWORK/NCR message 65535

ORA-02063: preceding 2 lines from SQLS

[/code]

This post has been answered by L. Fernigrini on Sep 2 2020
Jump to Answer
Comments
Post Details
Added on Sep 2 2020
23 comments
1,508 views