SDE feature class edits do not render in Dynamic Map Service

1296
10
09-24-2012 02:34 PM
DaveHighness
Occasional Contributor II
I am testing ArcServer 10.1 and SDE on SQL Express on the Amazon E2C. I have deployed our app that we built on 10.0. In the app we use Python GeoProcessing tasks to update SDE feature classes by updating attributes, adding and removing features. Sometimes we use cursors and sometimes we use GeoProcessing tools. In 10.0 this all works as we expect. In 10.1 we do the same GP task and it runs through without error but the results are not rendered in the Dynamic Service. If we open the feature class in ArcMap the changes are there.

Why is this not working? I think it must be related to either caching of map images or versioning in the SDE feature class. We do not have caching or versioning turned on, we only have the DEFAULT version.

Thanks, Dave
Tags (2)
0 Kudos
10 Replies
KevinDunlop
Occasional Contributor III
Did you make sure that your services are pointing to the registared SDE data stores in ArcGIS Server 10.1?  Unlike 10.0, if you don't registar your SDE connections with ArcGIS Server prior to pushlishing a map service, ArcGIS will make a local copy of your data and pull from that.  In 10.0, the data sources were maintained if access was available but this is only true 10.1 if data sources are registar with AGS.
0 Kudos
DaveHighness
Occasional Contributor II
Yes, the SDE Connection is registered and the MXD has the same connection parameters as the registered connection. That does make sense though. Is there a way I can check to be sure that the service is using that connection?

Dave
0 Kudos
DaveHighness
Occasional Contributor II
I found the manifest XML file and it seems to indicate that the service is using the same connection as the MXD.

D:\arcgisserver\config-store\services\ServiceFolder\ServiceName.MapServer\esriinfo\manifest\manifest.xml

Back to not making any sense again.

Dave
0 Kudos
DaveHighness
Occasional Contributor II
This seems like a likely cause of the issue.

http://resources.arcgis.com/en/help/main/10.1/index.html#/Concurrency_and_locking/003n000000z4000000...

So the app is editing the SDE feature class outside of a edit session using the GeoProcessor while the same feature class is being read by an ArcServer service. Are the edits not getting committed to DEFAULT? How do I commit them? We are using SDE in SQL Express 2008 r2. Am I going to have to use versions and commit the version at the end of my edit?

This is not an issue on our 10.0 server with SDE on SQL Express 2005.

Dave
0 Kudos
RobertBeckler
New Contributor
I'm having a similar issue using a file based geodatabse.  I run a published python script which updates my geodatabase (i can see the correct results in catalog) but my pubished service to display the feature layer will not show me the updated data.  My web app is using the Silverlight API.  My service is set to dynamic, not cached. 

Robert
0 Kudos
KevinGooss
Occasional Contributor
sounds like you have a lot vested in python and gp tools so this is probably not an option but it seems like the trend esri would want you to move toward would be using the REST api on a feature service to do these edits. Perhaps there is some hint in how the rest api gets it done (assuming that works as expected). sorry i couldn't be more helpful.
I too have alot of code vested in python gp tools and the new publish routine is kicking my butt. It's a hassle to publish one gp tool, let alone 30 tasks in one gp service.
0 Kudos
by Anonymous User
Not applicable
Hi Robert,

Have you contacted Esri Support Services about this yet? It might be the best option so we can take a look at this first hand.

Thanks,
Andrew
0 Kudos
DaveHighness
Occasional Contributor II
Kevin, I agree a that the new publish routine is a pain in the rear for GP Tasks. I wish we could have kept the possibility of doing it the old way by publishing an entire toolbox at once. On another note, I did find where the publisher puts the Python script and other stuff after it publishes. You can edit the script there later if you need to. The publisher also misses copying files to that location that are necessary for the script to run. I was able to copy them to the location and have that work. You should have a folder similar to the following.

D:\arcgisserver\directories\arcgissystem\arcgisinput\Blah_GPTasks\BlahTask.GPServer\extracted\v101\geoprocessing

Still haven't figured out the editing issue. Yes we are heavily invested in Python GP Tasks as it seemed ESRI wanted us to be?!?

Dave
0 Kudos
DaveHighness
Occasional Contributor II
Ok, finally found the problem (tail between my legs). I made a stupid error in my config and forgot to point to the map server on the new server and left it pointing to our old server, thus no errors. Of course I didn't see edits made on the new server. DOH!

So, everything is working as advertised. I do still think the new publishing routine is a pain in the rear but all the blame for this issue lands squarely to myself, not ESRI.

Thanks, ESRI
0 Kudos