Re: [gdal-dev] very slow sql ogr2ogr conversion

2021-04-28 Thread Neil Walker
The problem is bcp. The docs says bcp is only enabled for suitable drivers like native 11.0. I have this because ssms uses it and its in my odbc list. However when I try to use it as a driver, ogr2ogr fails. Only the default driver works, which I presume does not support bcp. So how can I get i

Re: [gdal-dev] very slow sql ogr2ogr conversion

2021-04-28 Thread Neil Walker
Thanks, this is Windows 10. I turned debug on and noticed it said BCP 0. BCP is available and I use it so not sure why it says 0? However, I will test using that flag to see if it works or enables it. Like I said, the other odd thing is it told me to try one of three drivers (odbc, sql server, sql

Re: [gdal-dev] very slow sql ogr2ogr conversion

2021-04-28 Thread Hector muro
Hi Neil, I found a similar situation once. Are you using Linux? If so, I think the ogr2ogr MSSQLSpatial driver for Linux does not use BCP (for multiple inserts, which is why the CSV goes so fast). If not, have you tried using the MSSQLSpatial Configuration Options for the command? I don't remembe

[gdal-dev] very slow sql ogr2ogr conversion

2021-04-27 Thread Neil Walker
Hello, First time user, I hope this is the right mailing list :) I have a fairly small (37mb - 160,000 linestrings) shp file and it loads into QGIS in a couple of seconds. I want to import this into sql server, so used the following ogr2ogr command: ogr2ogr -f "MSSQLSpatial" "MSSQL:server=my