OGR and oracle (MS4W 1.5)

Frank Warmerdam warmerdam at POBOX.COM
Mon Apr 3 09:29:10 EDT 2006


listuser HH wrote:
> Hi all,
> 
> I started to test the new ms4w package - I like it. I tried the oracle 
> connection with mapserver and ogr - both work fine.
> 
> The next thing I wanted to test was a ogr VRT with points from a x / y 
> table. I get the message: ORA-12514: TNS:listener does not currently 
> know of service requested in connect descriptor in <unnamed>. In the 
> .ovf file I use the same connection like in the mapfile before 
> (OCI:usr/pwd@//serverIp:port/dbName). I have to say that I don't use a 
> TNS because the oracle instant client don't have a tnsnames.ora file and 
> I wasn't sure where to put one. I hoped that this will not be necessary 
> since the other connections work. Has anyone a hint?

Norbert,

You should be able to put the same thing in your <SrcDataSource> element
in the VRT file that you would normally use as the datasource name when
doing direct access with ogrinfo or MapServer.  The only think I can
think to be careful of is to apply XML escaping for an characters likely
to be special in your connect info.  For instance if there is an angle
bracket in it, you would need to replace this with &lt; or &gt;.

I don't believe the "TNS" aspect will be any different through VRT or
more directly.  It is more likely that the initial connect is failing
due to some corruption in the connect info and then the OCI libraries are
falling back to the TNS mechanism, that fails and that is the error that
is reported.

PS. This is great news that the new MS4W supports Oracle!  Kudo's to
Howard and Assefa.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list