I have been attempting to get "Microsoft ODBC Driver 13 for SQL Server" running in Ubuntu for two days now, and I am out of ideas / have exhausted Google.
My test machine is a vagrant VM, and these are the relevant pieces of the bash script that is acting as a provisioner:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install -y python-software-properties vim curl libgss3 libstdc++6 git-core libpcre3-dev make
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
and
cd /home/vagrant
wget https://download.microsoft.com/download/2/E/5/2E58F097-805C-4AB8-9FC6-71288AB4409D/msodbcsql-13.0.0.0.tar.gz
tar xvzf msodbcsql-13.0.0.0.tar.gz
sudo chmod +x msodbcsql-13.0.0.0/build_dm.sh
sudo chmod +x msodbcsql-13.0.0.0/install.sh
./msodbcsql-13.0.0.0/build_dm.sh --accept-warning
directory=$(ls /tmp | grep 'unixODBC')
path="/tmp/$directory/unixODBC-2.3.1"
cd $(echo $path)
sudo make install
cd /home/vagrant/msodbcsql-13.0.0.0/
sudo ./install.sh install --accept-license
sudo ln -s /usr/lib64/libodbcinst.so.2 /lib/x86_64-linux-gnu/libodbcinst.so.2
cat << EOF | sudo tee -a /home/vagrant/.odbc.ini
[MSSQL]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
Server=<my_server>\<my_sqlserver_instance_name>,1433
Database=PDS
Threading=1
UsageCount=1
EOF
sudo chown vagrant:vagrant /home/vagrant/.odbc.ini
This is the relevant bits of the install log:
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on libmsodbcsql-13.0.so.0.0
[Fri Apr 22 20:16:59 UTC 2016] Copying install.sh to /opt/microsoft/msodbcsql/13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on install.sh
[Fri Apr 22 20:16:59 UTC 2016] Copying build_dm.sh to /opt/microsoft/msodbcsql/13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on build_dm.sh
[Fri Apr 22 20:16:59 UTC 2016] Copying README to /opt/microsoft/msodbcsql/13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on README
[Fri Apr 22 20:16:59 UTC 2016] Copying LICENSE to /opt/microsoft/msodbcsql/13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on LICENSE
[Fri Apr 22 20:16:59 UTC 2016] Copying WARNING to /opt/microsoft/msodbcsql/13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on WARNING
[Fri Apr 22 20:16:59 UTC 2016] Copying INSTALL to /opt/microsoft/msodbcsql/13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on INSTALL
[Fri Apr 22 20:16:59 UTC 2016] Copying bin/bcp.rll to /opt/microsoft/msodbcsql/13.0.0.0/en_US
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on bcp.rll
[Fri Apr 22 20:16:59 UTC 2016] Copying bin/SQLCMD.rll to /opt/microsoft/msodbcsql/13.0.0.0/en_US
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on SQLCMD.rll
[Fri Apr 22 20:16:59 UTC 2016] Copying bin/BatchParserGrammar.dfa to /opt/microsoft/msodbcsql/13.0.0.0/en_US
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on BatchParserGrammar.dfa
[Fri Apr 22 20:16:59 UTC 2016] Copying bin/BatchParserGrammar.llr to /opt/microsoft/msodbcsql/13.0.0.0/en_US
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on BatchParserGrammar.llr
[Fri Apr 22 20:16:59 UTC 2016] Copying lib64/msodbcsqlr13.rll to /opt/microsoft/msodbcsql/13.0.0.0/en_US
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on msodbcsqlr13.rll
[Fri Apr 22 20:16:59 UTC 2016] Copying docs/en_US.tar.gz to /opt/microsoft/msodbcsql/13.0.0.0/docs/en_US
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on en_US.tar.gz
[Fri Apr 22 20:16:59 UTC 2016] Copying include/msodbcsql.h to /opt/microsoft/msodbcsql/13.0.0.0/include
[Fri Apr 22 20:16:59 UTC 2016] Setting permissions on msodbcsql.h
[Fri Apr 22 20:16:59 UTC 2016] Extracting documentation from /opt/microsoft/msodbcsql/13.0.0.0/docs/en_US/en_US.tar.gz
...
[Fri Apr 22 20:16:59 UTC 2016] Creating symbolic links
[Fri Apr 22 20:16:59 UTC 2016] Linking bcp to bcp-13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Linking sqlcmd to sqlcmd-13.0.0.0
[Fri Apr 22 20:16:59 UTC 2016] Registering the Microsoft ODBC Driver 13 for SQL Server driver
odbcinst: Driver installed. Usage count increased to 1.
Target directory is /etc
ldd shows that all of the dependencies are met:
vagrant@vagrant-ubuntu-trusty-64:~$ ldd /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
linux-vdso.so.1 => (0x00007ffd109e8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fde5d698000)
libodbcinst.so.2 => /lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007fde5d486000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fde5d280000)
libgss.so.3 => /usr/lib/libgss.so.3 (0x00007fde5d074000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fde5cda9000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fde5c9cc000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007fde5c76d000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fde5c460000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fde5c159000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fde5bf42000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fde5bd24000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fde5b95e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fde5dc8e000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fde5b754000)
libshishi.so.0 => /usr/lib/libshishi.so.0 (0x00007fde5b4fa000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fde5b2ca000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fde5b0c6000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fde5aebb000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fde5acb6000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fde5aa9b000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fde5a886000)
libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007fde5a5c8000)
libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007fde5a348000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fde5a142000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007fde59f0f000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fde59cf5000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fde59ab3000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fde598ab000)
When I attempt to test the driver this is the response:
vagrant@vagrant-ubuntu-trusty-64:~$ isql -v MSSQL sa <password>
[28000][unixODBC][Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Login failed for user 'sa'.
[ISQL]ERROR: Could not SQLConnect
In the SQL Server error log I have this:
2016-04-22 13:35:04.52 Logon Error: 18456, Severity: 14, State: 8.
2016-04-22 13:35:04.52 Logon Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: <my_ip>]
I can log in to the named server using the sa user and "SQL Server Authentication" using Microsoft SQL Server Management Studio, so I do not believe this is a "Windows Authentication" issue which seems to be the standard answer for this error-severity-state combination.
I have no idea where to go from here. ANY help is greatly appreciated!!!