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 have a mxd file that contains a few raster and feature layers that was published by ArcGIS Server as a map service. Meanwhile, a model was created to update the contents of the raster and feature layers in the mxd file. The intention is that all the users across my organisation will be able to see changes every time the model runs.

The problem that I have is the geoprocessing by the model failed due to the error that is the data "May be locked by another application." every time I ran it.

Could anyone please help with offering an idea how to get around this issue?

p.s. I also tried to use File Geodatabase to store the layers but ended up with the same error.

Thanks!

Cheers, Alex

share|improve this question
    
Will it work if you Stop the map service, run the model, and then Start the map service again? –  PolyGeo Mar 9 '12 at 2:07
1  
What your seeing is a version/locking issue since the fGDB isn't able to really support that function. You need a enterprise GeoDatabase that you can version the data even just one level; so the mapservice is looking at the snap-shop while the data in the back-end is updated. –  D.E.Wright Mar 9 '12 at 2:38
    
Yes, it did. When the service was stopped, the lock files associated with the feature layer were gone. The model ran perfectly. However, this process should run without any human intervention. –  alextc Mar 9 '12 at 2:39
    
D.E.Wright - Are you talking about ArcSDE? Just wonder of any workaround without having to touch on the ArcSDE. Thanks! –  alextc Mar 9 '12 at 2:42
    
Back to the question, do I need to create a geodatabase in ArcSDE and store the data there, and what else do I need to make the versioning config? Thanks –  alextc Mar 9 '12 at 3:14
show 1 more comment

1 Answer

up vote 1 down vote accepted

In What's New at ArcGIS 10.1 (which is linked to from resources.esri.com) it says:

"The new REST-based ArcGIS Server Administrator API allows you to administer your ArcGIS Server site through scripting. With this API you can automate tasks such as creating a site, adding machines, publishing services, querying the logs, and starting and stopping services."

This means you should be able to do what you want (without ArcSDE) when that version is released.

In the meantime starting and stopping maps services programmatically at 10.0 seems to be possible using a technique described in the ArcGIS Discussion Forum.

Or a better example of using AGSSOM courtesy of blah238 is found at StackExchange GIS.

share|improve this answer
1  
Perhaps a better example of using AGSSOM right here on GIS.se: gis.stackexchange.com/questions/17639/… –  blah238 Mar 9 '12 at 4:11
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.