Home » Infrastructure » Windows » ORA-28500 when trying an ODBC connection to Sybase through HS
ORA-28500 when trying an ODBC connection to Sybase through HS [message #152141] Wed, 21 December 2005 06:40 Go to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Hi,
I've been struggling with the following problem for some time now:

I have an Oracle EE Server 9.2.0.5 on Windows 2000 SP4. The client has provided a System DSN (ODBC DataSource) on this machine to a Sybase database. The driver used is Sybase Adaptive Server Anywhere 6.0 (driver version 6.00.04.3799).
The ODBC driver seems to work fine in Access.

I've been asked to create a database link using Heterogeneous Services to connect from the Oracle database to the Sybase.

So far I've performed the following steps:
  1. modified tnsnames.ora, I've added this entry:
    #
    # MHRG/AXI: HS Connection (through odbc) to PMS
    #
    PMS_ODBC = 
      (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)
                     (HOST = my_db_host)
                     (PORT = 1522)
          )
        (CONNECT_DATA = (SID = PMS))
        (HS = OK)
       )
  2. modified listener.ora, in the sid_list I've added this entry:
    (SID_DESC=
      (SID_NAME=PMS)
      (ORACLE_HOME=<oracle_home>
      (PROGRAM=hsodbc)
    )
  3. Added a initPMS.ora file in the <oracle_home>\hs\admin\:
    # This is a sample agent init file that contains the HS parameters that are
    # needed for an ODBC Agent. 
    
    #
    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = the_odbc_data_source
    HS_FDS_TRACE_LEVEL = off
    
    
    #
    # Environment variables required for the non-Oracle system
    #
    #set <envvar>=<value>
  4. bounced the listener.
  5. In the user I've created a database link: CREATE DATABASE LINK pms_odbc USING 'PMS_ODBC';


Now, when I'm running a simple like
SELECT *
  FROM all_users@pms_odbc


I receive the following error:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC]Specified driver could not be loaded due to system error  126 
(Adaptive Server Anywhere 6.0). 
(SQL State: 00000; SQL Code: 160)
ORA-02063: preceding 2 lines from PMS_ODBC

If I set HS_FDS_TRACE_LEVEL = 4 in the initPMS.ora file, I get this:
SQL> select *
  2    from all_users@pms_odbc
  3  /
  from all_users@pms_odbc
                 *
ERROR at line 2:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC]DRV_InitTdp: errors.h (1981): ; Specified
driver could not be loaded due to system error  126 
(Adaptive Server Anywhere 6.0). 
(SQL State: 00000; SQL Code: 160)
ORA-02063: preceding 2 lines from PMS_ODBC



Any ideas?

MHE

[Updated on: Wed, 21 December 2005 10:56]

Report message to a moderator

Re: ORA-28500 when ... solved! [message #152198 is a reply to message #152141] Wed, 21 December 2005 11:02 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Ok, I've solved the problem (with the help of Oracle Support).
It came down to this:
the driver used was located on a remote system on a network drive. The user didn't have access to it. We copied the ODBC driver to the local machine and bounced the listener (yet again Razz ).
A second error I made was that I didn't provide the credentials in the creation of the database link.

So the solution was
1. use a local ODBC driver
2. restart the listener
3. use a database link with the correct Sybase credentials


MHE
Previous Topic: How to mount the database after changing the IP address of WIN-NT
Next Topic: XP 10G R2 ... Java and tnsping NG
Goto Forum:
  


Current Time: Tue Apr 16 01:39:00 CDT 2024