QGIS – Connecting to Microsoft SQL Server: A Comprehensive Guide
qgissql server
I can't connect my QGIS to SQL Server.
This is my database:
This is my connection configuration to QGIS
If I press test connection it says "Driver not loaded". If i load database, there is nothing happening.
What is wrong here?
Best Answer
I would check the name of the MSSQL server again. Normally it is something like: username/MSSQLSERVER unless you renamed it during installation. I would also either set the checkbox to trusted connection or enter the sa user if you have the rights. Before you can test the connection, you have to click on the database list. Make sure that you have checked the box at the bottom for "Also list tables with no geometry, because especially in the beginning you often don't have any geodata in the database. Select your database and you can test the connection.
If you're working with an x64 server, keep in mind that there are
different ODBC settings for x86 and x64 applications. The "Data
Sources (ODBC)" tool in the Administrative Tools list takes you to the
x64 version. To view/edit the x86 ODBC settings, you'll need to run
that version of the tool manually:
%windir%\SysWOW64\odbcad32.exe (%windir% is usually C:\Windows) When
your app runs as x64, it will use the x64 data sources, and when it
runs as x86, it will use those data sources instead.
Best Answer
I would check the name of the MSSQL server again. Normally it is something like: username/MSSQLSERVER unless you renamed it during installation. I would also either set the checkbox to trusted connection or enter the sa user if you have the rights. Before you can test the connection, you have to click on the database list. Make sure that you have checked the box at the bottom for "Also list tables with no geometry, because especially in the beginning you often don't have any geodata in the database. Select your database and you can test the connection.