[mapserver-users] oraclespatial connect error

Rodrigo Cabral cabral at yadata.net
Fri Feb 22 16:32:12 PST 2002


Your error means that the Oracle client cannot find the database (service)
to connect. Try using simply 'username/password' for CONNECTION to see if
the default service works.

Also, your DATA statement is not going to work. 'circle' must be in the
select list. Like "circle from (select circle...)". BUT, why are you doing
that? Try this:

DATA "circle FROM room_geoloc"
or
DATA "circle FROM room_geoloc USING SRID <srid#>" if you have an srid number
defined.

Rod.

----- Original Message -----
From: "Yu-Hsin Chen" <ychen at yorktel.com>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Friday, February 22, 2002 4:04 PM
Subject: [mapserver-users] oraclespatial connect error


I've compiled mapserver 3.5 with oraclespatial option on my Mandrake
Linux 8.0 with Oracle 8.1.7i.  When I run sqlplus at Linux prompt I can
get to the database with un/pw at bis login.  However, when I tried it from
a map file I get "msOCIConnect() in msOracleSpatialLayerOpen():
OracleSpatial error. Error while trying to retrieve text for error
ORA-12541" in my browser.  ORA-12541 is "TNS:could not resolve service
name".

My map file looks like this:

LAYER
  NAME "oracle"
  CONNECTIONTYPE oraclespatial
  CONNECTION 'un/pw at bis'
  DATA "circle from (select room_id, longitude, latitude from
room_geoloc)"
  TYPE POINT
  STATUS ON
    ...
    ...
END

Thanks in advance to whoever can help me.

Yu-Hsin Chen




More information about the MapServer-users mailing list