Skip to main content
edited tags; edited title
Link

GDAL OSGEO4W ogr2ogr mssql BCP error

Source Link

OSGEO4W ogr2ogr mssql BCP error

I’m trying to load a fairly large GIS file into an MSSQL table using OGR2OGR from OSGEO4W with BCP enabled, but I’m encountering the following error:

ERROR 1: SQL Error SQLState=HY000, NativeError=0, Msg=[Microsoft][ODBC Driver 17 for SQL Server]Connection is not enabled for BCP

I thought it might be related to this ticket on GIS Stack Exchange, but I noticed that there is a specific package in the OSGEO4W installer for BCP import, which I have installed. The server is also enabled for BCP. Has anyone else encountered this issue?

I also noted that installing the GIS Internals version was accepted as a solution in another question, but that post is around 3 years old now. Given that there is a specific package for BCP, am I missing something?

PS, I can load the file with BCP turned off, but it is incredibly slow for large files.