Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to make a non geographic table available to a map service. I thought you simply added the table to the MXD and publish it with a relate to the field they were linked and then publish the service, where the data would be available as a table layer. I have done this, and only the geographic data is shown as an available layer. Am I missing a step?

I now know, I do not want a Join or relate; I want the table to available via a query on the table.

edit

OK, there seems to be a few issues here.

We are using a direct connect, and this needs Oracle Client installed on the ArcGIS Server. The SOC and SOM accounts were a red herring. If we're going straight through the SDE connection port, then you don't need the client, but as we're going through to the db, i.e. using 2 tier architecture, rather than 3 tier, then we need the client.

So we're installing the client on the server, as we've never directly connected before, and I'll post the results. But now, looking back on it, it all seems logical really, as we're bypassing the SDE layer

This is for a Web application, so the data is exposed via REST on the 'net

I am actually not too sure it is possible, which is very odd...

edit

Just to ensure I am not going mad, and am doing this all the right way; I am creating an MXD, adding a featurelayer to it, then adding a 'flat' table (no geo data), saving it and serving it up on the ArcGIS server. when I do, all of the features display, but querying the Rest interface tells me there are no tables, just this one polygon layer.

That's all cool isn't it? I am not insane?

share|improve this question
    
If you look at the MapServer using REST does it include any Tables? help.arcgis.com/en/arcgisserver/10.0/apis/rest/mapserver.html –  MathiasWestin May 23 '11 at 13:28
    
It seems to, but just including the table in the mxd/msd and it doesn't appear in the layers/tables. –  Hairy May 23 '11 at 13:35
    
Where is the table? FGDB, SQL Server, etc? Could be a permissions issue. –  Chad Cooper May 23 '11 at 13:38
    
ArcSDE on Oracle. If I open the mxd in ArcMap, and query the feature, I can see the related object, but not on the Map service. I am starting to think this is permissions based, as the two tables are on different schemas, in two different databases... –  Hairy May 23 '11 at 14:13
    
What happens if you run arcmap as the arcsoc user, and open the mxd, can you still see the table? –  Kirk Kuykendall May 24 '11 at 13:21
show 5 more comments

3 Answers

This sounds like a permissions issue, I've dealt with something similar before. I had a view in SQL Server that I needed to join onto a FC in my MXD for a map service, here's what I had to do:

  1. give my SOC account (which in my case is a domain acct) db read and db execute access to my database
  2. create a ole db connection in ArcCatalog with OS login
  3. copy that odc file to the same directory my mxd lives in (this is with a mxd service, btw, not msd)
  4. create a connection to my view using above odc connection, add view to my mxd

It's really about your SOC account having access to the db, but for some crazy reason, that odc file that defines the connection has to live in the same directory as the mxd behind the service.

share|improve this answer
    
Wow, that convoluted! I'll look this up tomorrow, thanks for your advice. –  Hairy May 23 '11 at 16:04
    
+1 good useful info! –  Kirk Kuykendall May 24 '11 at 13:23
    
Chad, I can see the relate when I open the document in ArcMap, and can query the data, and view the data. I cannot see it across the net using Flex and ArcGIS. I have also simply tried loading the table itself with the features as a separate layer, and this too doesn't display. I'll send your info over to the server team. Cheers –  Hairy May 25 '11 at 13:45
    
@Hairy, relate or join? Hmm, I've never done my steps above on a relate, only a join. Wonder if that could make a difference? –  Chad Cooper May 25 '11 at 14:28
    
I ma actually trying not to have a join or relate; I genuinely want to stand the table up on its own. –  Hairy May 26 '11 at 8:40
add comment
up vote 2 down vote accepted

OK, there seems to be a few issues here.

We are using a direct connect, and this needs Oracle Client installed on the ArcGIS Server. The SOC and SOM accounts were a red herring. If we're going straight through the SDE connection port, then you don't need the client, but as we're going through to the db, i.e. using 2 tier architecture, rather than 3 tier, then we need the client.

So we're installing the client on the server, as we've never directly connected before, and I'll post the results. But now, looking back on it, it all seems logical really, as we're bypassing the SDE layer.

RESOLVED:

Generally speaking, connections are handled transparently when creating the map service; however to connect to a table (eg for a table query) the following is needed:

The relevant version of the oracle client must be installed on the arcserver instance

There must be a tns entry in the tnsconnection file for the sde instance being accessed

You then need to update the init_server.sh file for arcserver to have environment details of the oracle client

Typically add the below to /apps/arcgis/server10.0/servercore/.Server/init_server.sh

   PATH=$PATH:$HOME/bin
   export PATH
   umask 022

   export ORACLE_BASE=/opt/u01/app/oracle
   export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/client_1
   export TNS_ADMIN=$ORACLE_HOME/network/admin
   export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/lib
   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

and then you are cooking with gas.

share|improve this answer
    
If this is an interim update and not a final answer, please copy it into the question and mark it as an edit so people are aware that the question has been progressing and that you still welcome replies. –  whuber May 24 '11 at 16:22
    
Its an answer. I added it as an answer. I would have added it as an edit otherwise. –  Hairy May 24 '11 at 17:33
    
You don't need to have the client on the server to use DirectConnect, keep that in mind as you are working since it adds one more packeage that you need to keep updated on your server. –  D.E.Wright May 24 '11 at 23:43
    
ESRI have said you do need a transport layer capable of resolving TNS, and said you do need the client in order to make it 2 tier. –  Hairy May 25 '11 at 6:50
add comment

Try to create the table within a PGDB on-the-fly...and use the PGDB table to join with spatial data...that should work.

share|improve this answer
    
Sorry, I should have made what I need clearer, I will edit my question –  Hairy May 23 '11 at 12:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.