0

I'm running QGIS 3.4.3 on a Windows 10 machine and when loading vector layers from our MS SQL Server version 12 everything seems to be working great. No problems connecting or visualizing the data. But when looking closer at a layer with property lines I realized some are missing. When inspecting the same mssql layer/table with FME Data Inspector the missing lines are visible.

Googleing the issue eventually led me to this bug report/feature request. Summarized it says that QGIS (or acctually GDAL which QGIS relies on for mssql-support) simply cant show SQL Server Spatial binary format version 2 meaning that six year (2012) old changes in my database just can't be visualized!? Version 2 geometries are simply not recognized?

This issue and this pull from Github indicates that this problem was solved with the 3.8.0 update?

But when updating to 3.8.0 I get this error instead and now I can't connect to the server:

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed. The login is from an untrusted domain and connot be used with Windows authentication.[Microsoft][ODBC Driver Manager]Drivrutinens SQLSetConnectAttr misslyckades. QODBC#: Unable to connect

Am I just being stupid or is there really a way to read SQL Server Spatial binary format v2 with QGIS/Gdal? Has anybody had any success with this? Work-arounds are more then welcome.

------ Additional information by request -------

SQL Server Spatial binary format v2: I can't access a file to send over, could below documentation do?https://docs.microsoft.com/en-us/openspecs/sql_server_protocols/ms-ssclrt/77460aa9-8c2f-4449-a65e-1d649ebd77fa https://sqlprotocoldoc.blob.core.windows.net/productionsqlarchives/MS-SSCLRT/%5bMS-SSCLRT%5d.pdf

https://docs.microsoft.com/en-us/openspecs/sql_server_protocols/ms-ssclrt/77460aa9-8c2f-4449-a65e-1d649ebd77fa

MS SQL Server: Product: Microsoft SQL Server Standard (64 bit) Operating system: Microsoft Windows NT x64 Platform: NT x64 Version: 12.0.5571.0 Memory: 55282 MB Processors: 16

  • That looks like a login error...?? – DPSSpatial Jul 9 at 16:36
  • Agree. No one would be happier then me if this is a login error. But I made no changes what so ever (except the qgis 3.8.0 upgrade) and prior I could access the database (with some features missing), now this. Could anybody confirm that SQL Server Spatial binary format v2 is working with Qgis 3.8.0? – johlund Jul 9 at 16:44
  • Could you provide me an example of this spatial binary format? And is this MS SQL Server 2016 specific? – DPSSpatial Jul 9 at 16:53
  • @DPSSpatial updated the original question. – johlund Jul 9 at 17:18
  • Thanks! I would love to test/chime but don't think I know enough about the problem... the CLR data type is something we only hit when accessing spatial / geometry data through a linked server using OPENQUERY... not sure if that helps you at all... – DPSSpatial Jul 9 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.