[Mapserver-users] SDE Direct Connect

Charles Greer CGREER at sonoma-county.org
Thu Dec 11 09:15:44 PST 2003


I've been following this list for some time now, eager to do more MapServer development and
to contribute to the discussion, but for the time being all my time is taken up by things like SDE and ArcIMS, 
so now I've got the opportunity to clarify the issues a little bit.  Caveat - I'm a DB2 spatial guy 
and don't know Oracle I've become more familiar over time with the bizarre issues surrounding Oracle
and spatial stuff, so...

Oracle has inherent spatial support that is in many ways incompatible with the way
that SDE handles things.  In fact, spatial types in "ArcSDE with Oracle" are simply BLOBS,
whereas the "direct connect" method supports Oracle's native geometric/geographic
types.  The creation of a "direct connect" for Oracle was ESRI's response to the
inherent incompatability between how Oracle Spatial and ArcSDE handle things.

In other words, direct connect is a way to bypass SDE.  Thus as J.F. says below
MapServer would have to know a lot more about native Oracle Spatial support
in order to support the sde:oracle method.  That's also why, for Oracle, SDE is 
slower than direct connect in many applications.

ArcSDE is a "lowest common denominator" API, which supports geographic types
even when the underlying RDBMS doesn't (like SQL Server, or the base Oracle product).  
So its a good API to deliver geography to MapServer, but will not take advantage of all the 
full range of spatial features in any of the spatial databases.

I hope that helps with the discussion somewhat.  Hope to participate more fully
in the future,

Charles Greer


>>> <Jean-Francois.Doyon at CCRS.NRCan.gc.ca> 12/11/03 08:53AM >>>
Liz,

The Arc clients do provide that flexibility, though I don't think you can do
that right now with MapServer.

The main problem is that the underlying organization of data (i.e. SDE table
structure) doesn't lend itself to that kind of access without the client
explicitly understanding it, which mapserver natively wouldn't ...

If you really wanted you could do something like use PHP/MapScript to read
the data directly out of Oracle, and then put it into a format MapScript
understands and so on, but that's probably much slower than just using the
SDE service !!

As a general rule MapServer's SDE support is fairly basic ... It only reads
basic tables and so on ... If for example you use more advanced features
such as geodatabases, you can no longer really use MapServer with SDE
(That's what I was told by someone who looked at that at least ...)

As a general idea it might be nice to look at expanding MapServer support
for SDE to be more aware of some SDE specific features, such as GeoDatabases
and the direct connect feature ... We'd have to find out whether the latest
Client SDK provides the necessary functionality and look at adding mapserver
support for it.  What you've found about "sde:oracle" suggests that at least
part of the funcitonality is probably there, but mapserver doesn't work with
it nicely ...

But I'm pretty sure the short answer right now is that you can't do it :)

J.F.

-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu 
[mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of Liz Godwin
Sent: Thursday, December 11, 2003 11:24 AM
To: mapserver-users at lists.gis.umn.edu 
Subject: [Mapserver-users] SDE Direct Connect


Hello,

Is it possible to connect directly to SDE through mapserver, or only to
the the sde service?  I have tried playing with the connection string in
my map file, but to no avail.  

I have heard that a direct connection is faster than a service
connection, that is why I would like to try this.

In the SDE config/tuning guide for Oracle, it suggests I use
"sde:oracle" as my service, instead of "esri_sde " for a direct
connection.
My connection string in my map file: 
"<hostname>,sde:oracle,<database>,<user>,<password>"  (all <parameters>
filled in)
My error:  msSDELayerOpen(): SDE error. SE_connection_create(): The
file path does not exist, or is too long (> 512 chars), or has invalid
characters.. (-269)

This error suggests to me that the SDE handler in Mapserver doesn't
like the colon.  Is this a bug, or is it just not possible for a direct
connection?

Thanks!!

Liz Godwin



_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users 
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list