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

Reetz, Michael (NLPV) Michael.Reetz at nlpvw.niedersachsen.de
Thu Oct 20 01:39:42 PDT 2022


Hello all,

it seems that nobody has an idea. I've found some tips (some of them really old) to install the latest ODBC-Driver from Microsoft or the SQL Server Native Client. First is installed, second is not supported in SQL Server 2019. Another tip was to rename or delete ogr_MSSPATIAL.dll but this dll isn't installed on my system (obviously not part of the QGIS installation package).

So, it looks as if ogr2ogr is not really helpful for me and I have to look for another tool.

Best regard
Michael

Von: Qgis-user <qgis-user-bounces at lists.osgeo.org> Im Auftrag von Reetz, Michael (NLPV) via Qgis-user
Gesendet: Mittwoch, 19. Oktober 2022 12:50
An: qgis-user at lists.osgeo.org
Betreff: [Qgis-user] ogr2ogr doesn't connect to MS SQL Server


ACHTUNG!! Diese E-Mail erreicht Sie von einem Absender außerhalb der niedersächsischen Landesverwaltungs-Infrastruktur mit TLS-Verschlüsselung. Bitte klicken Sie auf keine Links oder öffnen Sie keine E-Mail-Anhänge, falls Sie den Absender nicht kennen und nicht wissen, ob der Inhalt sicher ist.
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:image001.png at 01D8E46E.DFA7EF10]

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


More information about the Qgis-user mailing list