Overwrite a map service

You can overwrite a map service that has been published to a stand-alone ArcGIS Server 10.6 or later site. Reasons to overwrite a map service include updating source data, changing map or layer properties (such as layer symbology), editing the item description, and setting different configuration properties. When you overwrite a map service, any maps that use the service in client applications are updated.

Overwriting a map service is similar to publishing a map service. You can change most of the properties of a map service when you overwrite it, including properties of the map as well as configuration settings. You can't change the name of the service or its location (the service URL). If you are overwriting a cached map service, see the Cached map service considerations section below.

While in the process of overwriting a map service, you may decide to save a service definition instead. A service definition compiles information into a single file, allowing you to overwrite the map service at a later time. Information about saving a service definition is included in the workflow below. To learn more, see Introduction to saving service definitions.

You can also use ArcPy to overwrite a map service to a stand-alone server. To learn more, see Automate publishing services.

  1. Open the ArcGIS Pro project that contains the map that you published as a map service.
    Note:

    Typically, you overwrite a map service with the same map (modified or not) that you previously published from ArcGIS Pro. However, you can overwrite a map service with a different map, either in the same project or in a different project, as long as the project contains a publisher or administrator connection to the server.

  2. Optionally, make changes to the map or its layers.
  3. In the Catalog pane, on the Project tab, expand Servers and browse to the map service you want to overwrite.
  4. Right-click the service and click Overwrite Overwrite.
  5. On the Select Map dialog box, browse to the map you want to use to overwrite the service, select it, and click OK.

    The Overwrite Map Service pane appears. On the General tab, under Service Details, the name of the map service is displayed. You cannot change this name. Under the name, you can use the item description from the published service (the default) or update the item description from the map you are using to overwrite the service.

  6. Accept the default Use the item description from the service item description or click Use the item description from the map.

    The default option preserves the item description of the current service. The other option overwrites it.

  7. Optionally, modify the information in the Summary and Tags fields.

    The fields may be empty if you used the item description from the map in the previous step.

    You can type a maximum of 128 tags.

  8. Optionally, under Data, change the option to reference registered data or copy all data to the server.

    For information about the data options, hover over the Information icon Information.

  9. Optionally, click the Configuration tab at the top of the pane and change capabilities or service properties of the service.

    For information about capabilities and service properties, see Configure a map service.

  10. Optionally, click the Content tab to view the folder, new service, and sublayers with assigned IDs if available.

    If you enabled the Allow assignment of unique numeric IDs for sharing web layers option on the Map Properties dialog box, assigned IDs appear for each sublayer. To change an ID, click the number next to the layer or table. On the Layer Properties or Standalone Table Properties dialog box, on the General tab, type a custom integer ID in the Layer ID or Table ID text box. For more information, see Assign layer IDs.

  11. Under Finish Publishing, click Analyze Identify potential performance bottlenecks and errors to review any errors and warnings.

    Errors and warnings are listed on the Messages tab. Right-click a message to open its help topic or take corrective action in the software. Errors Error must be resolved before you can overwrite your map service. Resolving warnings Warning is recommended but not required.

    Learn more about analyzing GIS resources

    Note:
    Analyzer help topics refer to the web layer that corresponds to the service type being published. For example, you may see references to map image layers for an analyzer issued for your map service.

  12. After you have resolved errors, and optionally, resolved warnings, click Publish Publish to publish the map service.

    To save a service definition for the map service instead, click the Publish drop-down arrow and click Save As SD.

    Caution:

    Publishing a service definition staged to overwrite will automatically replace the existing map service if found on the server. To avoid unintentionally overwriting existing map services and their associated data, store these service definitions in a way that makes them distinguishable from other service definitions.

  13. When the service is successfully overwritten, click the Manage the map service link at the bottom of the pane to access the service REST endpoint.
    Tip:

    If you configured the service to draw using tiles from a cache, click the Jobs button Open Job Status Pane under Finish Publishing to view the cache status in the Job Status pane.

Cached map service considerations

When you overwrite a map service that is drawn using tiles from a cache (a cached map service), you can keep the existing cache. If you keep the existing cache, you can change many configuration properties of the service. For example, you can increase the visible range of the service by publishing additional levels of detail at either end of the range. However, you can't change the tiling scheme, image format, compression, or cache directory.

Cache extent settings made when you published the map service previously are not preserved. By default, when you overwrite the service, the map extent is cached. Optionally, you can cache tiles for an area of interest. In either case, tiles are cached only for the levels of detail that you select on the Build Tiles and Calculate dialog box.

Also, if you keep the existing cache, the map you use to overwrite the service must have the same spatial reference as the service and a spatial extent that overlaps the service.

If you do not keep the existing cache, you can change all configuration properties of the service, including the tiling scheme and cache directory. Essentially, this is the same as publishing a new map service, except that the service URL does not change.

Also, if you do not keep the existing cache, the tiles that were built for the previously published map service are disassociated from the service and new tiles are built. The old tiles are associated with an automatically generated service named <service_name>_<timestamp>. You can delete this service from the server at your convenience.

Keep the existing cache

Follow the steps below to access the Keep existing cache setting:

  1. At the top of the Overwrite Map Service pane, click the Configuration tab.
  2. Under Capabilities, next to Map, click the Configure Service Properties button Configure Service Properties.
  3. Under Layer Drawing, check or uncheck the Keep existing cache box.

Related topics