Closed NMItools closed 1 year ago
@NMItools If you use the GISInternals builds, this issue due to that the MSSQLSpatial driver with the legacy ODBC driver hasn't been compiled in by default. You should either install the MSSQL plugin with that build, use the stable branch (daily) build or wait for the 3.6.3 release where it will be fixed.
Thank you for the fast answer! In the meanwhile I have found that from the newer QGIS network installer version, there is
gdalmss: OGR plugin with SQL Native Client support for MSSQL Bulk Copy
as an option, so I have install it and now MSSQLSpatial appeared as an
MSSQLSpatial -vector- (rw+): Microsoft SQL Server Spatial Database (BCP)
Now it is working but I have to specify the driver in the connection string and
a config parameter --config MSSQLSPATIAL_USE_BCP
to NO since my driver does not support BCP (from message)
ERROR 1: SQL Error SQLState=HY000, NativeError=0, Msg=[Microsoft][SQL Server Native Client 11.0]Connection is not enabled for BCP
So the working version (without BCP) is:
ogr2ogr -f "MSSQLSpatial" "MSSQL:server=verdi;database=GIS;driver=SQL Server Native Client 11.0;UID=***;PWD=***" "Warsaw_district.shp" -a_srs "EPSG:3857" --config MSSQLSPATIAL_USE_BCP NO
In the meantime recompiled the stable releases with the MSSQL driver compiled in by default. Closing this issue.
I was trying to import some data into MS SQL Server with ogr2ogr as before
I am using
but I got this message:
ERROR 1: Unable to find driver 'MSSQLSpatial'.
Also, ogrinfo does not show "MSSQLSpatial" as a supported format like before?
Any explanation?