Hi. I want connect to MS SQL Server(under windows) from Oracle(under linux).
Enviroment:
1 DOUBLE-LAPTOP - Windows XP SP3, SQL Server 2005 Standart Edition
2 DOUBLE-SERVER - Gentoo linux, kernel 2.6.25, Oracle Database 10g Express Edition.

Install on linux:
unixODBC-2.2.12 and freetds-0.82
freetds.conf:
Code:
double-server etc # cat /etc/freetds.conf | grep -v \#
[global]
        tds version = 8.0
        dump file = /tmp/freetds.log
;       debug flags = 0xffff
        timeout = 10
        connect timeout = 10
        text size = 64512
[hsodbc]
        host = DOUBLE-LAPTOP
        port = 1433
        tds version = 8.0
        client charset = UTF-8
double-server etc #
odbcinst.ini
Code:
double-server etc # cat /etc/unixODBC/odbcinst.ini | grep -v \#
[hsodbc]
Description     =
Driver  = /usr/lib/libtdsodbc.so
UsageCount      = 1
double-server etc #
odbc.ini
Code:
double-server etc # cat /etc/unixODBC/odbc.ini | grep -v \#
[hsodbc]
Driver  = hsodbc
Description     =
Trace   = Yes
TraceFile       = /tmp/sql.log
ForceTrace      = Yes
Server  = double-laptop
Port    = 1433
Database        = DevicelockDB
double-server etc #
inithsodbc.ora
Code:
double-server etc # cat /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/hs/admin/inithsodbc.ora | grep -v \#
HS_FDS_CONNECT_INFO = hsodbc
HS_FDS_TRACE_LEVEL = 4
HS_FDS_TRACE_FILE_NAME= /tmp/hs.log
set ODBCINI=/etc/unixODBC
double-server etc #
listener.ora
Code:
double-server etc # cat /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora | grep -v \#

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
      (PROGRAM = extproc)
    )
   (SID_DESC =
     (SID_NAME = oracle)
        (ORACLE_HOME =/usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
        (PROGRAM = hsodbc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
        (ADDRESS = (PROTOCOL = TCP)(HOST = double-server)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)
double-server etc #
tnsnames.ora
Code:
double-server etc # cat /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/tnsnames.ora | grep -v \#

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = double-server)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

hsodbc =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = DOUBLE-LAPTOP)(PORT = 1521))
    )
    (CONNECT_DATA =(SID = hsodbc)
    (SRVR = DEDICATED)
    )
  (HS = OK)
  )
double-server etc #
unixodbc and freetds work is fine:
Code:
double-server client # tsql -S double-laptop -U 'double-laptop\Mr.Double' -P password
locale is "ru_RU.UTF-8"
locale charset is "UTF-8"
1> exit
double-server client # isql -v hsodbc double-laptop\\Mr.Double password
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> quit
double-server client #
Check Heterogeneous Services Initialization:
Code:
select view_name from dba_views where owner='SYS' and view_name='HS_FDS_CLASS';

VIEW_NAME
------------------
HS_FDS_CLASS
LISTENER work fine too:
Code:
double-server client # /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnsping hsodbc

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 24-OCT-2008 14:54:07

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = DOUBLE-LAPTOP)(PORT = 1521))) (CONNECT_DATA =(SID = hsodbc) (SRVR = DEDICATED)) (HS = OK))
OK (10 msec)
double-server client # /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnsping double-laptop

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 24-OCT-2008 14:54:22

Copyright (c) 1997, 2005, Oracle.  All rights reserved.

Used parameter files:

Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=10.26.10.103)(PORT=1521)))
OK (10 msec)
double-server client#/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl 

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 24-OCT-2008 14:55:03

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                24-OCT-2008 14:08:05
Uptime                    0 days 0 hr. 47 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Default Service           XE
Listener Parameter File   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File         /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=double-server.ksl.lan.megafonkavkaz.ru)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
  Instance "XE", status READY, has 1 handler(s) for this service...
Service "oracle" has 1 instance(s).
  Instance "oracle", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> quit
double-server client #
next step, create DBLINK:
Code:
CREATE PUBLIC DATABASE LINK mssql CONNECT TO "double-laptop\Mr.Double" IDENTIFIED BY "password" using 'hsodbc';
But, when try select from remote database:
Code:
SELECT * FROM DLUsers@mssql;
I recive error:

ORA-28545: error diagnosed by Net8 when connecting to an agent Unable to retrieve text of NETWORK/NCR message 12564 ORA-02063: preceding 2 lines from MSSQL

what i do wrong?