[Qgis-user] ogr2ogr doesn't connect to MS SQL Server

Reetz, Michael (NLPV) Michael.Reetz at nlpvw.niedersachsen.de
Wed Oct 19 03:49:35 PDT 2022


Dear QGIS users,

we are using MS SQL Server 2019 as basis for Geoserver and GIS software. There are a lot of tables that have attributes of the types geometry and/or geography. I can load these tables into QGIS (3.22.8) projects without any problems.

Now I'm asked to add an geography attribute to one table that has already an geometry attribute and populate it with coordinates by transforming the geometry values. I've found code how to do this with ogr2ogr but when I run it I receive the error message "Unable to open datasource 'MSSQL:server=<my server IP>;database=<my database>;trusted_connection=yes;' with the following drivers". MSSQLSpatial is not listed but should be part of the ODBC driver. Any idea? Which driver QGIS is using?

Best regards

Michael



*****************************************
Michael Reetz
Datenbanken und Anwendungsentwicklung
Nationalpark-Verwaltung Niedersächsisches Wattenmeer
Virchowstr. 1 | 26382 Wilhelmshaven
Tel.: +49 (0) 4421 911 291
e-mail: michael.reetz at nlpvw.niedersachsen.de<mailto:michael.reetz at nlpv-wattenmeer.niedersachsen.de>
Web: https://www.<https://www./>nationalpark-wattenmeer.de
[cid:image002.png at 01D8E3B9.3D556090]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221019/0f54972e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 6513 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20221019/0f54972e/attachment.png>


More information about the Qgis-user mailing list