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)

example.jpg (115.6 KB ) - added by jaburn 8 years ago.
screen shot of error
sample.zip (6.0 KB ) - added by jaburn 8 years ago.
grid shp file

Download all attachments as: .zip

Change History (11)

by jaburn, 8 years ago

Attachment: example.jpg added

screen shot of error

comment:1 by Even Rouault, 8 years ago

Cc: tamas added

comment:2 by zimirrr, 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.

in reply to:  2 ; comment:3 by tamas, 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.

in reply to:  description ; comment:4 by tamas, 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.

in reply to:  3 comment:5 by zimirrr, 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.

in reply to:  4 comment:6 by jaburn, 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 jaburn, 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.

by jaburn, 8 years ago

Attachment: sample.zip added

grid shp file

comment:9 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.