[QGIS-Developer] MSSQL driver not found & Can't open lib 'SQL Server' - QGIS 2.18 LTR on Debian
kimaidou
kimaidou at gmail.com
Fri Nov 16 08:00:48 PST 2018
Hi all,
I am trying to connect to a MSSQL server from a QGIS installed in a Linux
Debian Jessie computer.
I have checked that the credentials are ok with the mssql-client from
Microsoft:
mssql-cli -S myserver -U carto -P ******* -d MyBase
I installed the following packages from debian and Microsoft repos :
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/debian/8/prod.list >
/etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install -y mssql-cli unixodbc-dev mssql-tools
msodbcsql17 msodbcsql odbcinst libqt4-sql-tds libqt4-sql-odbc
When I open QGIS and try to set up a connection, I use not DSN, and I put
my server "myserver" as the host. I add the user and password.
Then try to list the databases, but I get this error
[unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found
I tested with
root at carto:~# odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
So I checked /etc/odbcinst.ini which seems ok
root at carto:~# cat /etc/odbcinst.ini
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
UsageCount=1
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2
UsageCount=1
Should I install more packages ? Any help appreciated.
Regards,
Michaƫl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20181116/10669e09/attachment-0001.html>
More information about the QGIS-Developer
mailing list