[mapserver-users] Connecting Oracle Spatial

Yu-Hsin Chen ychen at yorktel.com
Fri Jun 7 20:10:26 PDT 2002


Back in late February when I first try to get mapserver to work with Oracle (8.1.7i) I had connect problem.  I don't recall if the error message is exactly the same as yours.  I ended up add the following lines in my Apache web server configuration file for the Oracle connect to be successful:

<IfModule mod_env.c>
SetEnv ORACLE_SID gisdb
SetEnv ORACLE_HOME /opt/oracle/product/9.0.1
</IfModule>

The file I modifid was commonhttpd.conf it may be different for you.  I'm not sure if this solves your problem or not but if you're running out of solutions this won't hurt.

Yu-Hsin


-----Original Message-----
From:	lballard at YesVirginia.org [mailto:lballard at YesVirginia.org]
Sent:	Fri 6/7/2002 12:43 PM
To:	mapserver-users at lists.gis.umn.edu
Cc:	
Subject:	[mapserver-users] Connecting Oracle Spatial

ERROR:
msOCIConnect() in msOracleSpatialLayerOpen(): OracleSpatial error.


Redhat 7.2
Oracle Client 9.0.1
Mapserver nightly build 6/6

Config command:
./configure --with-oraclespatial=/opt/oracle/product/9.0.1/
--with-sde=/usr/local/apache/htdocs/mapserver/tmp/sdeexe81/
--with-sde-version=81
--with-gd=static,/usr/local/apache/htdocs/mapserver/tmp/gd-1.8.4/

Map File snippet:
LAYER
  NAME states
  TYPE polygon
  STATUS default
  MAXSCALE 10000000
  CONNECTIONTYPE oraclespatial
  CONNECTION 'u/p at gisdb'
  DATA "SHAPE FROM LD_QT_NAMSTATES_SDO"
  CLASS
    NAME 'states'
    COLOR 220 224 230
    OUTLINECOLOR 0 0 0
  END
END

tnsping:
[oracle at gisintranet tmp]$ tnsping gisdb

TNS Ping Utility for Linux: Version 9.0.1.0.0 - Production on 07-JUN-2002
12:38:51

Copyright (c) 1997 Oracle Corporation.  All rights reserved.

Used parameter files:
/opt/oracle/product/9.0.1/network/admin/sqlnet.ora

Used ONAMES adapter to resolve the alias
Attempting to contact
(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=qt
vadb01.questerra.com)(PORT=1521)))(CONNECT_DATA=(SID=gisdb)(SRVR=DEDICATED))
)
OK (10 msec)

I can connect successfully through SQPLUS.
I added the Oracle Library path to the httpd.conf file:
setenv LD_LIBRARY_PATH /opt/oracle/product/9.0.1/lib


Thanks,

Lowell Ballard







More information about the MapServer-users mailing list