[gdal-dev] Issues with Running ogr2ogr Script from SQL Server or Task Scheduler
Joshua Geoghegan
joshua.geoghegan at mornpen.vic.gov.au
Tue May 28 18:49:21 PDT 2019
Hi all,
I've have an ogr2ogr script (attached) that creates a kml from a sql database. This works fine, but if I run the batch file from SQL Server using xp_cmdshell I get the following message twice
ERROR 1: Can't load requested DLL: \\gissrv.ad.mps\data\ogr2ogr\gdalplugins\ogr_MSSQLSpatial.dll
126: The specified module could not be found.
The kml is created but without the geometries and smaller file size.
I ended up deciding on creating a scheduled task on our production server to run the batch every few hours, and the same problem occurs, the file is smaller without geometries.
I set environment path variables for GDAL, GDAL_DATA and GDAL_DRIVER but the problem remains.
The ogr2ogr files live on our GIS server, so I also tested by copying them locally on the Production server with no luck.
I then tested the scheduled task on our development server and it runs fine. I see there are some dll's on C:\System32 on dev that aren't in prod, including
* SQLServerSpatial100,120,140, although 110 is on both servers.
* Msodbcsql11 - I installed the driver but no luck
* adalsql - I installed the driver but no luck
I am happy to go with the scheduled task on Development as I've spent a lot of time trying to get this working, but what would cause production to fail and why can't I get it to work as SQL stored procedure?
Ideally I'd like the SQL option so the user can have the data on the fly.
Regards,
[MPS]
JOSHUA GEOGHEGAN | GIS Specialist
Email: joshua.geoghegan at mornpen.vic.gov.au<mailto:joshua.geoghegan at mornpen.vic.gov.au>
Phone: 03 5950 1321
Private Bag 1000, Rosebud VIC 3939 | 90 Besgrove Street, Rosebud VIC 3939
Follow us on social media!
[mornpen.vic.gov.au]<https://www.mornpen.vic.gov.au/>[Facebook]<https://www.facebook.com/mornpenshire>[Instagram]<https://www.instagram.com/ourpeninsula/>[Twitter]<http://twitter.com/MornPenShire>
[Latest News]<https://www.mornpen.vic.gov.au/emailcampaign>
Mornington Peninsula Shire acknowledges and pays respect to the Boon Wurrung/Bunurong people,
the traditional custodians of these lands and waters.
We are committed to carbon neutrality.
DISCLAIMER: This email (and attachments) is for the intended recipient only and may contain privileged, confidential or copyright information. If received in error, please notify sender immediately and delete. Any other use is prohibited. Shire accepts no liability for damage caused by this email (and attachments) due to viruses, corruption, delay, interruption, unauthorised access or use. Views expressed are those of the individual and not necessarily Shire. Shire will only collect personal information from you with your prior consent, use it for the purpose collected or as reasonably expected and not disclose without consent, except if required by law/regulation. For further information see our privacy policy:
[Arrow] mornpen.vic.gov.au/privacystatement<https://www.mornpen.vic.gov.au/privacystatement>
[Consider the Environment]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 4821 bytes
Desc: image001.gif
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0005.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 257 bytes
Desc: image002.gif
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0006.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 201 bytes
Desc: image003.gif
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0007.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 289 bytes
Desc: image004.gif
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0008.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.gif
Type: image/gif
Size: 199 bytes
Desc: image005.gif
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0009.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 17377 bytes
Desc: image006.jpg
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0001.jpg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: GMSC_Bushland_WMAExport.txt
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190529/fdcbd4d0/attachment-0001.txt>
More information about the gdal-dev
mailing list