[mapserver-users] Oracle database problem

Jim Klassen Jim.Klassen at ci.stpaul.mn.us
Wed Mar 4 08:44:45 PST 2009


I am probably missing something here, but your connection string looks incomplete to me. I have only seen the following forms:

user/password at tns_name
user/password at database_host:port/global_database_service_name

(note the global service name needs to match exactly what the TNS listener on the database host, in particular this is usually not equal to the SID.)

Now my confusion is to get the ORA-00942: table or view does not exist error, you must have connected to a database, right? So the next question is did you connect to the right database and as the right user?

>>> Paul Ramsey <pramsey at opengeo.org> 03/03/09 5:52 PM >>>
You say the query runs OK from SQL/Plus, but are you logging into
SQL/Plus as the "sde" user?

On Wed, Feb 25, 2009 at 12:33 PM, Balázs Bámer <bamerbalazs at gmail.com> wrote:
> Hi All,
>
> I have a MapServer 5.2.1 compiled with
> ./configure --with-oci
> --with-oraclespatial=/usr/local/instantclient_11_1 --with-proj
> --with-threads --with-gdal --with-ogr --with-jpeg --with-png=/usr/lib
> --with-php=/usr/include/php5
> on Ubuntu 8.10
>
> I tried to maka a layer with
>
> LAYER
>  NAME lejto
>  METADATA
>    "DESCRIPTION" "lejto"
>    "wms_title" "lejto"
>    "ows_include_items" "all"
>  END
>  PROJECTION
>    "init=epsg:23700"
>  END
>  TYPE POLYGON
>  STATUS ON
>  CONNECTIONTYPE oraclespatial
>  CONNECTION "sde/asdfgh at 10.0.8.51:1521"
>  DATA "geom from LEJTO_2008_070814 using SRID 23700"
>  CLASS
>    NAME "lejto"
>    STYLE
>      OUTLINECOLOR 127 127 127
>    END
>  END
>  DUMP TRUE
>  TEMPLATE "template.html"
> END # layer
>
> GetCapabilities query works. If I try to draw the map with (you can try):
> http://att-it.homelinux.net:22080/cgi-bin/sokfolt?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=lejto&STYLES=&SRS=epsg:23700&BBOX=420000,40000,950000,370000&WIDTH=938&HEIGHT=591&FORMAT=image/png
>
>
> the response is msDrawMap(): Image handling error. Failed to draw
> layer named 'lejto'.
> msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error:
> ORA-00942: table or view does not exist
>  . Query statement: SELECT rownum, geom FROM LEJTO_2008_070814 WHERE
> SDO_FILTER( geom, MDSYS.SDO_GEOMETRY(2003, 23700,
> NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(420000,40000,950000,370000)
> ),'querytype=window') = 'TRUE' . Check your data statement.
>
> while in sqlplus the query quite similar to the above (just modified
> to write row count instead of the 2 columns)
>
> SELECT count(1) FROM LEJTO_2008_070814 WHERE SDO_FILTER( geom,
> MDSYS.SDO_GEOMETRY(2003, 23700,
> NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(420000,40000,950000,370000)
> ),'querytype=window') = 'TRUE'
>
> runs.
>
> SRID information and table user_sdo_geom_metadata is actualized:
>
> Insert into USER_SDO_GEOM_METADATA
> (TABLE_NAME,COLUMN_NAME,DIMINFO,SRID) values
> ('lejto_2008_070814','GEOM',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',437534.249899998,935741,5E-8),MDSYS.SDO_DIM_ELEMENT('Y',47058.0469,355027,5E-8)),23700);
> drop index IDX_LEJTO_2008_070814_GEOM;
> UPDATE lejto_2008_070814 c SET c.geom.SDO_SRID=23700;
> CREATE INDEX idx_lejto_2008_070814_GEOM ON lejto_2008_070814 (GEOM)
> INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('layer_gtype=POLYGON');
>
> What can be the problem?
>
> Thank you in advance.
> Best regards: Balázs Bámer
>
> What can be the problem?
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list