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
I downloaded the archived ms4w_3.0.6 and copied the
ogr_SDE.dllandgdal_SDE.dlltoC:\Program Files (x86)\GDAL\gdalpluginsDownloaded and installed the ArcSDE binaries from the MyEsri site. Verified the
SDEHOMEpath was set correctly.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.
setenv.batbeforeogrinfo? In mysetenv.batI have several environment variables that needs to be defined, likeset GDAL_DRIVER_PATH=\ms4w\gdalplugins. – jgrocha Oct 17 '17 at 21:42setenv.bat. My GDAL installation is not fromMS4W, but from the gisinternals site. I am only using theSDEplugins fromMS4W. The installation process I used is described here. Regaurdless, myGDAL_DRIVER_PATHis set toC:\Program Files (x86)\GDAL\gdalplugins, among the other required variables. Since my primary reason for using the GISInternals install is to use theosgeolibrary via python, id rather try and make this work then use the MS4W installation. – its30 Oct 18 '17 at 13:46ms4wand ransetenv.bat, esured all env. variables were set correctly, installed ArcSDE 10.2.1, set theSDEHOMEvariable and added thebindirectory to the path. Now when i runogrinfo --formatsI getERROR 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:38gdalinfo --formatsreports 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