Changing data in a map service

2081
3
Jump to solution
03-11-2014 03:17 PM
LisaArnold
New Contributor II
Hello,

I would like to have a map service which is based on data that will change periodically. I want the changes to be automatically reflected in the map service. Meaning,  when the data in the geodatabse, used in the map document which the service is published from is changed, I see the changes in my web application consuming said service. Am I correct in thinking that every time the underlying data/map doc of the map service changes I will have to republish the service? Is there a better way to do this? I have been doing fairly straight forward map services and using the FlexViewer, so I haven't branched out much. We are using ArcGIS Server 10.2.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
WilliamCraft
MVP Regular Contributor
If the types of changes include inserts (new records), updates (changes to exist records), or deletes (remove records) for the geometry or attribution, then you won't have to re-publish your service as long as your service is dynamic (e.g., not cached).  The data should be reflected almost immediately when you refresh the map service.  If you are changing schema (e.g., add new fields to an exist feature class, delete a field, re-name a feature class, add a new feature class, modify a subtype and domain), then you will need to stop and re-start your service IF the service contains any feature classes or tables affected by the changes I just mentioned.  This isn't an exhaustive list of schema changes, but it's a good initial list to make the point.  Additionally, if you add layers to your map document or change symbology or alter the label settings, you'll need to restart your service too.  So, in summary, the rule of thumb for whether you need to republish a service or not is this: data value changes (add, delete, update) don't typically require a restart (republish), but schema changes or map document changes do require a restart (republish).  I hope this helps.

View solution in original post

3 Replies
WilliamCraft
MVP Regular Contributor
If the types of changes include inserts (new records), updates (changes to exist records), or deletes (remove records) for the geometry or attribution, then you won't have to re-publish your service as long as your service is dynamic (e.g., not cached).  The data should be reflected almost immediately when you refresh the map service.  If you are changing schema (e.g., add new fields to an exist feature class, delete a field, re-name a feature class, add a new feature class, modify a subtype and domain), then you will need to stop and re-start your service IF the service contains any feature classes or tables affected by the changes I just mentioned.  This isn't an exhaustive list of schema changes, but it's a good initial list to make the point.  Additionally, if you add layers to your map document or change symbology or alter the label settings, you'll need to restart your service too.  So, in summary, the rule of thumb for whether you need to republish a service or not is this: data value changes (add, delete, update) don't typically require a restart (republish), but schema changes or map document changes do require a restart (republish).  I hope this helps.
LisaArnold
New Contributor II
Thanks very much for the response, the summary you provided is great. Just to clarify, are you equating restart and republish? In 10.0 I would have just restarted the service to see the changes, but I thought in 10.1 and up I had to republish, overwriting the existing service, not just restart.
0 Kudos
WilliamCraft
MVP Regular Contributor
Glad I could help!

Yes, in my case I am equating restart with republish.  Technically, I suppose there is a difference.  In 10.1 and later (or in 10.0 if you're using an MSD), you are correct... you do need to generate a new service definition first and then restart the service accordingly.  So yes, this act of recreating the SD and then 'republishing' it is required to pick up the changes.  You don't need to delete and re-create the service itself, though. 

It would be great if you could mark the correct answer with the green check!
0 Kudos