Get data sources that are used by ArcGIS Server map services with Python

Advertisements

2 thoughts on “Get data sources that are used by ArcGIS Server map services with Python

  1. Alex, thanks for this info. If you were to maintain a pre-prod (staging) and live (production) environment through a single set of .mxds for authoring and publishing services, is there a way to use service definition files to publish on the separate AGS instances? I see in this post you describe how to get to the data source information in the manifest xml. Is this information also available in the .sdd file and if yes could the .sdd file be edited (and saved as a new file) to publish the same service but instead of pointing to the staging environment’s data sources, make it point to the live ones by programmatically updating those in the .xml

    1. No problem! .sd file is just a zip file which contains some metadata among other things. You will not be able to edit manifest of the service after it has been published. Editing the metadata inside an .sd file without actually updating the data source paths within the actual .mxd you are publishing won’t be possible. I suggest having two copies of the .mxd files each pointing to the staging and production databases respectively. There are arcpy methods to keep them in sync in terms of layers and data source paths.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s