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!

Connecting Oracle to MS SqlServer using Microsoft® SQL Server® ODBC Driver

user8927749Feb 20 2012 — edited Feb 21 2012
Hello,

I have just downloaded the newly released Microsoft® SQL Server® ODBC Driver for Linux and trying to configure it to connect to SqlServer Database from Oracle using DG4ODBC

Below are my config files:

# odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /usr/oracle/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

cat /etc/odbcinst.ini
[SQL Server Native Client 11.0]
Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1720.0
#UsageCount = 1
Fileusage = 1
Dontdlclose = 1

[ODBC]
Trace = ON
Tracefile = /tmp/mstestodbc.log

cat /usr/oracle/.odbc.ini
[DEFAULT]
Driver = SQL Server Native Client 11.0

[MSTEST]
Driver = SQL Server Native Client 11.0
Description = Microsoft SQL Server ODBC Driver V1.0 for Linux
Servername = ret2axxx
Database = testdb
Port = xxxx

And when I am trying to do an ODBC test using isql I am getting the below error.

# iusql -v MSTEST username password
[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
[ISQL]ERROR: Could not SQLDriverConnect

Any help is much appreciated!!

Thanks,
Steve.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2012
Added on Feb 20 2012
5 comments
1,239 views