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!

ORA-28500 when connecting from Oracle to MSSQL - blank error message

12bee954-e7cc-41aa-a970-d727a14affd6Feb 11 2017 — edited Feb 13 2017

Hi,

I am trying to create a DB Link from Oracle 11g to MSSQL.

The Oracle Server is running on RHEL 7, the MSSQL Server is provided by Amazon Web Services.

I installed the unixODBC drivers on the Oracle Server and I am able to make a connection using isql.

When I try to use the database link I created, I am getting ORA-28500, without any details:

-------------------------

SQL> select * from test@sqlserver;

select * from test@sqlserver

                   *

ERROR at line 1:

ORA-28500: connection from ORACLE to a non-Oracle system returned this message:

[

SQL>

-------------------------

I can see the following in the HS log file:

-------------------------

[...]

Exiting hgoinit, rc=0 at 2017/02/11-16:55:51

Entered hgolgon at 2017/02/11-16:55:51

reco:0, name:test, tflag:0

Entered hgosuec at 2017/02/11-16:55:51

Exiting hgosuec, rc=0 at 2017/02/11-16:55:51

Entered hgopoer at 2017/02/11-16:55:51

hgopoer, line 233: got native error 0 and sqlstate H; message follows...

[

Exiting hgopoer, rc=0 at 2017/02/11-16:55:51

hgolgon, line 193: calling SQLSetConnectAttr got sqlstate H

Exiting hgolgon, rc=28500 at 2017/02/11-16:55:51 with error ptr FILE:hgolgon.c LINE:193 FUNCTION:hgolgon() ID:Connection Attribute: TRACE

Entered hgoexit at 2017/02/11-16:55:51

Exiting hgoexit, rc=0

-------------------------

What does native error 0 & sqlstate H mean?

My configuration files are below.

Thanks!

Unix ODBC File

[oracle@ora11g log]$ cat /etc/odbc.ini

[MSSQL]

Description=Microsoft ODBC Driver 13 for SQL Server

Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.4.0

UsageCount=1

Trace=Yes

Server=sqlservername.us-east-1.rds.amazonaws.com

Port=1433

Database=test

----------------------

HS INIT FILE

[oracle@ora11g log]$ cat ../admin/

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

HS_FDS_TRACE_LEVEL=4

HS_FDS_SHAREABLE_NAME = /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.4.0

HS_RPC_FETCH_REBLOCKING= OFF

HS_FDS_FETCH_ROWS = 1

HS_FDS_SQLLEN_INTERPRETATION=32

#

# ODBC specific environment variables

#

set ODBCINI=/etc/odbc.ini

#

# Environment variables required for the non-Oracle system

#

# set <envvar>=<value>

-------------------------

Listener File

[oracle@ora11g log]$ cat ../../network/admin/listener.ora

# listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = ora11g.home)(PORT = 1521))

    )

  )

SID_LIST_LISTENER=

  (SID_LIST=

      (SID_DESC=

         (SID_NAME=MSSQL)

         (ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1)

         (PROGRAM=dg4odbc)

      )

  )

ADR_BASE_LISTENER = /home/oracle/app/oracle

-------------------------

TNS Names File

[oracle@ora11g log]$ cat ../../network/admin/tnsnames.ora

# tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = ora11g.home)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl.home)

    )

  )

MSSQL =

  (DESCRIPTION=

    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))

    (CONNECT_DATA=(SID=MSSQL))

    (HS=OK)

  )

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2017
Added on Feb 11 2017
2 comments
2,688 views