[MS4W-Users] Oracle Unable to open datasource
jmckenna at gatewaygeomatics.com
Wed May 30 14:48:54 EST 2012
I don't have your answer, but maybe seeing my own local steps (that I
just did right
now to test your issue) may help?
- I test against an Oracle 10g instance (10.2.0.1), which runs on a separate
machine. On my local machine, where MS4W 3.0.6 is installed, I have the
10.2.0.1 client installed. (yes, I suppose I should upgrade to 11g soon)
- For GDAL/MapServer connections I need the SID of the database I'll be
connecting to, so I have configured the SID in my local machine (MS4W
machine), such as:
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.106)(PORT = 1521))
(SERVICE_NAME = GEO)
That file lives locally at:
Maybe a better example is at:
- Now I can attempt to connect through OGR (I've moved the ogr_OCI.dll file
as you mentioned, and which is part of the instructions at
-> "OCI" (read/write)
-> "ESRI Shapefile" (read/write)
-> "MapInfo File" (read/write)
ogrinfo OCI:jeff/pass at geo
INFO: Open of `OCI:jeff/pass at geo'
using driver `OCI' successful.
- Great, now I am ready to test through MapServer/OracleSpatial. I
moved the libmap.dll file as
mentioned in the instructions, then:
mapserv -v (response contained "INPUT=ORACLESPATIAL")
- my mapfile layer looks like:
CONNECTION "jeff/pass at geo"
DATA "ORA_GEOMETRY FROM (SELECT ORA_GEOMETRY FROM PARK)"
COLOR 255 255 0
OUTLINECOLOR 120 120 120
END # Layer
- shp2img returns a valid map image
Those are my steps. If you think I should upgrade to 11g for this testing
(if you think there is an 11g/MS4W issue) let me know and I will do so.
not sure of what is wrong with your connection. I will keep thinking on
MapServer Consulting and Training Services
On 12-05-30 3:18 PM, Simon Mercier wrote:
> Hi list
> I try to connect "ogrinfo" and Oracle in my ms4w install directory and
> it don't work? I still don't find out what's going on :-(
> 1) I use a the last ms4w 3.0.6 build.
> 2) I download the Oracle Instantclient 11.2.03 and set ORACLE_HOME. If
> I try to connect via sqlplus, everything work fine (I also try with a
> tnsnames.ora and work fine to)
> C:\..\ms4w306>sqlplus dt/dr2011 at LC/GEOSID
> SQL*Plus: Release 22.214.171.124.0 Production on Wed May 30 10:46:15 2012
> Copyright (c) 1982, 2011, Oracle. All rights reserved.
> Connected to:
> Oracle Database 11g Enterprise Edition Release 126.96.36.199.0 - 64bit Production
> With the Partitioning, OLAP, Data Mining and Real Application Testing
> 3) But for ogrinfo it just don't work. I moved the ogr_OCI.dll from
> ignored path to /ms4w306/gdalplugins and set all Environment variables.
> A formats option show that OCI driver is support:
> C:\..\ms4w306>ogrinfo --formats
> Supported Formats:
> -> "OCI" (read/write)
> -> "ESRI Shapefile" (read/write)
> -> "MapInfo File" (read/write)
> -> "UK .NTF" (readonly)
> C:\..\ms4w306>ogrinfo OCI:dt/dr2011 at LC/GEOSID
> ERROR 1: in <unnamed>
> Unable to open datasource `OCI:dt/dr2011 at LC/GEOSID' with the following
> -> OCI
> -> ESRI Shapefile
> -> MapInfo File
> -> UK .NTF
> -> SDTS
> 4) Same problem with mapserv and shp2img in my ms4w install dir. Where
> should I look now to make it run ?
More information about the MS4W-Users