1

I am attempting to use GDAL/OGR to read from an SDE enabled database (MS SQL). I have tried the steps located here but do not have access to the database server. I am also using a GDAL installation for python downloaded and installed from GISInternals. (gdal-202-1500-core.msi and GDAL-2.2.1.win32-py2.7.msi) so my setup is a little different.

What I have tried

  1. I downloaded the archived ms4w_3.0.6 and copied the ogr_SDE.dll and gdal_SDE.dll to C:\Program Files (x86)\GDAL\gdalplugins

  2. Downloaded and installed the ArcSDE binaries from the MyEsri site. Verified the SDEHOME path was set correctly.

  3. Add C:\Program Files\ArcGIS\ArcSDE\sqlexe\bin;C:\ms4w_3.0.6\ms4w\tools\gdal-ogrto path.

However, when I check for available formats, I see this:

C:\Program Files (x86)\GDAL\gdalplugins>ogrinfo --formats
ERROR 1: Can't load requested DLL: C:\Program Files (x86)\GDAL\gdalplugins\ogr_S
DE.dll
126: The specified module could not be found.

ERROR 1: Can't load requested DLL: C:\Program Files (x86)\GDAL\gdalplugins\ogr_S
DE.dll
126: The specified module could not be found.

Supported Formats:
  -> "ESRI Shapefile" (read/write)
  -> "MapInfo File" (read/write)
  -> "UK .NTF" (readonly)
  -> "SDTS" (readonly)
  -> "TIGER" (read/write)
  -> "S57" (read/write)
  -> "DGN" (read/write)
  -> "VRT" (readonly)
  -> "REC" (readonly)
  -> "Memory" (read/write)
  -> "BNA" (read/write)
  -> "CSV" (read/write)
  -> "NAS" (readonly)
  -> "GML" (read/write)
  -> "GPX" (read/write)
  -> "LIBKML" (read/write)
  -> "KML" (read/write)
  -> "GeoJSON" (read/write)
  -> "Interlis 1" (read/write)
  -> "Interlis 2" (read/write)
  -> "GMT" (read/write)
  -> "GPKG" (read/write)
  -> "SQLite" (read/write)
  -> "ODBC" (read/write)
  -> "WAsP" (read/write)
  -> "PGeo" (readonly)
  -> "MSSQLSpatial" (read/write)
  -> "PostgreSQL" (read/write)
  -> "MySQL" (read/write)
  -> "PCIDSK" (read/write)
  -> "OpenFileGDB" (readonly)
  -> "XPlane" (readonly)
  -> "AVCBin" (readonly)
  -> "AVCE00" (readonly)
  -> "DXF" (read/write)
  -> "Geoconcept" (read/write)
  -> "GeoRSS" (read/write)
  -> "GPSTrackMaker" (read/write)
  -> "VFK" (readonly)
  -> "PGDump" (read/write)
  -> "OSM" (readonly)
  -> "GPSBabel" (read/write)
  -> "SUA" (readonly)
  -> "OpenAir" (readonly)
  -> "PDS" (readonly)
  -> "WFS" (readonly)
  -> "HTF" (readonly)
  -> "AeronavFAA" (readonly)
  -> "Geomedia" (readonly)
  -> "EDIGEO" (readonly)
  -> "GFT" (read/write)
  -> "GME" (read/write)
  -> "SVG" (readonly)
  -> "CouchDB" (read/write)
  -> "Idrisi" (readonly)
  -> "ARCGEN" (readonly)
  -> "SEGUKOOA" (readonly)
  -> "SEGY" (readonly)
  -> "ODS" (read/write)
  -> "XLSX" (read/write)
  -> "ElasticSearch" (read/write)
  -> "PDF" (read/write)
  -> "Walk" (readonly)
  -> "CartoDB" (readonly)
  -> "SXF" (readonly)

C:\Program Files (x86)\GDAL\gdalplugins>

I am simply looking to read data from the SDE database with GDAL/OGR.


Looks like I am trying to connect to ArcSDE version 10.2.1. Not sure if its even possible to connect to a 10+ SDE with GDAL.

  • 1
    Did you run setenv.bat before ogrinfo? In my setenv.bat I have several environment variables that needs to be defined, like set GDAL_DRIVER_PATH=\ms4w\gdalplugins. – jgrocha Oct 17 '17 at 21:42
  • @jgrocha I did not run setenv.bat. My GDAL installation is not from MS4W, but from the gisinternals site. I am only using the SDE plugins from MS4W. The installation process I used is described here. Regaurdless, my GDAL_DRIVER_PATH is set to C:\Program Files (x86)\GDAL\gdalplugins, among the other required variables. Since my primary reason for using the GISInternals install is to use the osgeo library via python, id rather try and make this work then use the MS4W installation. – its30 Oct 18 '17 at 13:46
  • So I installed ms4w and ran setenv.bat, esured all env. variables were set correctly, installed ArcSDE 10.2.1, set the SDEHOME variable and added the bin directory to the path. Now when i run ogrinfo --formats I get ERROR 1: Can't load requested DLL: C:\ms4w\gdalplugins\ogr_SDE.dll 193%1 is not a valid win32 application – its30 Oct 18 '17 at 17:38
  • Does gdalinfo --formats reports the same error? I tested GDAL with SDE support to connect to ArcSDE v9.2. I don't know if ArcSDE 10.x is supported. – jgrocha Oct 18 '17 at 18:11
  • It produces the same error. I have doubts the driver supports connecting to ArcSDE 10+ . – its30 Oct 18 '17 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.