Problem connecting to MS SQL Server (DBI+odbc)


#1

Hi, I’ve been successfully connecting to SQL Server via RODBC. I’d like to start using the package ‘pool’, and to do so I need to connect using DBI+odbc. I have not been able to have odbc::odbcListDrivers() list the driver that I have been using with RODBC (I get an empty list)

This is what I get by running odbcinst -j at the command line

unixODBC 2.3.1
DRIVERS............: /export/home/ad.hector.herrada/odbcinst.ini
SYSTEM DATA SOURCES: /export/home/ad.hector.herrada/odbc.ini
FILE DATA SOURCES..: /export/home/ad.hector.herrada/ODBCDataSources
USER DATA SOURCES..: /export/home/ad.hector.herrada/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8

I have environment variable ODBCSYSINI = '/export/home/ad.hector.herrada'

/export/home/ad.hector.herrada/odbcinst.ini includes:

[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.1.0
UsageCount=1

Any ideas why I have not been able to set up the driver correctly?

Thanks!


#2

Hi @hherrada, the extension for your driver does not look right to me, I thought that it needs to end in .so, not .so.1.0


#3

Edgar, thanks for the reply. RODBC is working with this extension. That said, I still changed the extension to .so and I still got an empty list. Any other thoughts?