[GIS] “Driver not loaded Driver not loaded” when trying to connect to MSSQL database in QGIS 3.8 on MacOS

qgisqgis-3sqlsql server

When trying to create a new MSSQL Connection, I get an error saying: Error opening connection: Driver not loaded Driver not loaded.

Create a New MSSQL Connection dialog

I have tried both QGIS 3.8.0 and the newest pre-compiled QGIS 3.8.1 on MacOS Mojave. I am not sure how to run QGIS in a mode that might provide a better error message.

Anyone have ideas on what to change to make this work?

Best Answer

When you click "Test Connection" you get the "Driver not loaded Driver not Loaded" error at the top. However, if you ignore the Test Connection button, and instead click the "List databases" button, you will find that the connection works just fine, and the databases get listed.

I had the same issue, and was surprised nobody has answered this question yet. I had to find it buried in another question about MSSQL settings in QGIS, and it warned the user not to use the "Test Connection" button because it would not work correctly...

I found the hint not to click the Test Connection button here: MSSQL Connection settings for QGIS on Windows

Note I've created an issue on GitHub, the button should be fixed or removed: https://github.com/qgis/QGIS/issues/37177

Related Question