Opened 8 years ago
Closed 5 years ago
#6589 closed defect (wontfix)
ogr2ogr MSSQL failing
Reported by: | jaburn | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | 2.1.0 |
Severity: | major | Keywords: | ogr2ogr MSSQL MSSQLSpatial |
Cc: | tamas |
Description
ogr2ogr appears to fail when trying to convert to MSSQL Spatial. I have some shp files that I have uploaded previously to SQL Server with a pre 2.0 build and it worked fine. After upgrading to 2.1 I get an error about the native drive having a memory allocation issue. Nothing has changed on my system though and as mentioned, it worked previously with these same files. I have attempted to use the "Driver" variable to specify using just "SQL Server" driver as opposed to the "Native 11" version, but I still get an error. If there is a BCP setting I can test, please let me know.
Attachments (2)
Change History (11)
by , 8 years ago
Attachment: | example.jpg added |
---|
comment:1 by , 8 years ago
Cc: | added |
---|
follow-up: 3 comment:2 by , 8 years ago
Confirming almost same problem.
Downloaded from http://www.gisinternals.com/release.php and installed gdal-201-1800-x64-core.msi
And when running always shows up: ERROR 1: Can't load requested DLL: c:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
My system is windows 7 x64.
Previous install worked with no errors.
Also version from OSGeo4W works without error.
follow-up: 5 comment:3 by , 8 years ago
This is probably because the SQL Server Native Client is not installed on the system. You could either install the MS SQL Native Client 11 x64 driver or reinstall GDAL without the MSSQL BCP driver or just simply remove ogr_MSSQLSpatial.dll from the gdalplugins subdirectory.
Replying to zimirrr:
Confirming almost same problem.
Downloaded from http://www.gisinternals.com/release.php and installed gdal-201-1800-x64-core.msi
And when running always shows up: ERROR 1: Can't load requested DLL: c:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
My system is windows 7 x64.
Previous install worked with no errors.
Also version from OSGeo4W works without error.
follow-up: 6 comment:4 by , 8 years ago
I'd require some test data to be able to reproduce this issue.
Replying to jaburn:
ogr2ogr appears to fail when trying to convert to MSSQL Spatial. I have some shp files that I have uploaded previously to SQL Server with a pre 2.0 build and it worked fine. After upgrading to 2.1 I get an error about the native drive having a memory allocation issue. Nothing has changed on my system though and as mentioned, it worked previously with these same files. I have attempted to use the "Driver" variable to specify using just "SQL Server" driver as opposed to the "Native 11" version, but I still get an error. If there is a BCP setting I can test, please let me know.
comment:5 by , 8 years ago
Error has gone when I deleted ogr_MSSQLSpatial.dll. Thanks!
Replying to tamas:
This is probably because the SQL Server Native Client is not installed on the system. You could either install the MS SQL Native Client 11 x64 driver or reinstall GDAL without the MSSQL BCP driver or just simply remove ogr_MSSQLSpatial.dll from the gdalplugins subdirectory.
Replying to zimirrr:
Confirming almost same problem.
Downloaded from http://www.gisinternals.com/release.php and installed gdal-201-1800-x64-core.msi
And when running always shows up: ERROR 1: Can't load requested DLL: c:\Program Files\GDAL\gdalplugins\ogr_MSSQLSpatial.dll
My system is windows 7 x64.
Previous install worked with no errors.
Also version from OSGeo4W works without error.
comment:6 by , 8 years ago
Sorry I've been slow to respond. I will post some sample data this weekend. However, after doing more tests it appears to be failing on all of my shp datasets. Datasets were exported from both ESRI and qGIS. Looking at the one comment above, I can confirm that I do indeed have the MS SQL Native Client 11 x64 driver installed.
Thanks.
Replying to tamas:
I'd require some test data to be able to reproduce this issue.
Replying to jaburn:
ogr2ogr appears to fail when trying to convert to MSSQL Spatial. I have some shp files that I have uploaded previously to SQL Server with a pre 2.0 build and it worked fine. After upgrading to 2.1 I get an error about the native drive having a memory allocation issue. Nothing has changed on my system though and as mentioned, it worked previously with these same files. I have attempted to use the "Driver" variable to specify using just "SQL Server" driver as opposed to the "Native 11" version, but I still get an error. If there is a BCP setting I can test, please let me know.
comment:7 by , 8 years ago
I have added some sample data. It's a simple grid area that is in UTM-17n NAD 83. As an aside, I have upgraded my qGIS to the latest build 2.16, and a couple of my shp files transferred. these were simpler point files, but I can't see anything in particular that is different that would allow one to be transferred and the other not. Thank you for looking into this.
comment:8 by , 8 years ago
I'm having this issue using GDAL 2.1.2. See http://gis.stackexchange.com/questions/204347/ogr2ogr-bringing-up-memory-allocation-error/230778#230778
comment:9 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
screen shot of error