Database clients for Microsft SQL server on linux.

2016 Dec 17 at 01:03 » Tagged as :sql-server, heidisql, wine, dbeaver, sqlcmd, winetricks,

TLDR; Need to connect to microsoft sql server from your linux desktop? DBeaver maybe your best bet.

sqlcmd

My opinion of sqlcmd is that it sucks like most everything else by Microsoft. I am no fan of their technology but sometime in my line of work I do have close encounters with them. I try to avoid it as much as possible but sometimes , there's no choice. Microsoft SQL server is a product that I need to work with every once in a whie.  Rather than sqlcmd, I thought to try out VS Code to connect to the sql server. Unfortunately I had to upgrade my Linux Mint Version due partly to inistallation conflicts that sqlcmd had with it (Mint Rosa). But what do I get when I try to run the sql-server extension on VS Code?

Failed to load sql tools service 

HeidiSQL

This is a known issue with Mint 18. It will probably be fixed soon but rather than waiting for it, I thought to try our HeidiSQL, which works under wine. I am perfectly happy with using psql client for postgersql and the mysql console for mysql but having a single GUI that can connect to all three does have it's advantages too. But it will apparently not work out of the box with mssql 

Once you install native_mdac and mdac28 you need to close and open heidisql again. Oh, one more thing, it's heidiSQL portable that worked for me rather than the standard download. The standard download complained about a missing mysql.dll but the portable version worked with both mysql and mssql but not so postgresql. Heidi would complain about a missing libpq.dll which is there in the same folder at heideisql.exe. Typing `wine heidisql.exe` from the command line reveals:

err:module:import_dll Library MSVCR120.dll (which is needed by L"C:\\heidi\\LIBEAY32.dll") not found
err:module:import_dll Library LIBEAY32.dll (which is needed by L"C:\\heidi\\SSLEAY32.dll") not found
err:module:import_dll Library MSVCR120.dll (which is needed by L"C:\\heidi\\SSLEAY32.dll") not found
err:module:import_dll Library SSLEAY32.dll (which is needed by L"C:\\heidi\\libpq.dll") not found
err:module:import_dll Library MSVCR120.dll (which is needed by L"C:\\heidi\\LIBEAY32.dll") not found
err:module:import_dll Library LIBEAY32.dll (which is needed by L"C:\\heidi\\libpq.dll") not found
err:module:import_dll Library MSVCR120.dll (which is needed by L"C:\\heidi\\libpq.dll") not found

Apparently this can be fixed by installing vcrun13 in winetricks, but winetricks just hangs on it without producing any output.

DBeaver

So I decided to ditch all these and switch to DBeaver. DBeaver is JDBC and automatically downloads the driver. So it works with practically any RDBMS and CSV files too! DBeaver also has the advantage being compatible with almost any SQL or noSQL database.