Select to view content in your preferred language

Referenced Services - Updating file path

634
7
03-05-2024 12:05 PM
BrendanSoulé
Occasional Contributor

Hi there,

We have a number of referenced services that point to a shapefile or GDB on our network file storage. The storage hardware is being updated soon and IT has let us know that the filepath will need to change from '\\server1\arcgis' to '\\newserver\gis' and we'll need to point all referenced services to that new location. 

Is there a way to reliably automate the filepath update for these referenced services without having to manually republish them? Thanks!

0 Kudos
7 Replies
MarceloMarques
Esri Regular Contributor

@BrendanSoulé 
ArcGIS Pro 3.2 Update Data Source Tool
can update the map documents and now can also update ArcGIS Server Services.   Update data sources—ArcGIS Pro | Documentation
If you run into any issue using the tool, then please open a ticket with Esri Technical Support to investigate further.
I hope this helps.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
0 Kudos
Scott_Tansley
MVP Regular Contributor

If you can manage the cutover very carefully, i.e. allowing yourself time, then theoretically, you could retire server1 and create a DNS entry to alias new server as 'server1'.  Things would just continue to work, assuming the sub-folders and permissions remain equal.  If it's a phased migration, then you're going to need to follow Marcelo's advice below.

Scott Tansley
https://www.linkedin.com/in/scotttansley/
MarceloMarques
Esri Regular Contributor

@Scott_Tansley - a DNS Alias is a good alternative, as you mentioned, if the path to the sub-folders remains the same.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
0 Kudos
Scott_Tansley
MVP Regular Contributor

Yeah - it's not my favourite option, but it's the one that involved least work.  But only works if the data is migrated and ready.  The old machine can be turned off (and will not be turned on again) and then the DNS applied.  

My preference is to use DNS up front, and have a \\datapath\ UNC alias, that can be swapped from server1 to newserver, but when it's retrospective like this, there are limited options.

Scott Tansley
https://www.linkedin.com/in/scotttansley/
BrendanSoulé
Occasional Contributor

Thank you @MarceloMarques and @Scott_Tansley  for the information! I'll definitely ask about the DNS option, it would be nice to avoid changing filepaths altogether.

For the arcpy method, does the update have to be done in the APRX used to publish the layer? Or can we change the connection path on the service itself, maybe using the ArcGIS API for Python?

 

0 Kudos
MarceloMarques
Esri Regular Contributor

@BrendanSoulé 

ArcGIS API for Python API Reference - DataStoreManager
https://developers.arcgis.com/python/api-reference/arcgis.gis.server.html#datastoremanager

This resource provides information about the data holdings of the server, as well as the ability to manage (add new items, update primary data store, remove a data store item, etc) the data store. Data items are used by ArcGIS Pro, ArcGIS Desktop, and other clients to validate data paths referenced by GIS services.


There is a bug with the ArcGIS API for Python "DataStoreManager".
BUG-000131019 for ArcGIS GIS Server (esri.com)
Associated service workspace metadata does not update after updating the registered data store connection string for services with registered data sources.
Last Modified: January 11, 2024
Status: In Product Plan
Workaround: Republish services from MXDs with the updated database connection strings.

NOTES:

  • I would try ArcGIS Pro 3.2 Update Data Source Tool to update the ArcGIS Server Services.   
    Update data sources—ArcGIS Pro | Documentation
  • You might also consider opening a ticket with Esri Technical Support to inquire about this, Support might be able to give you a Python API script that works for your case.

I hope this helps.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
0 Kudos
BrendanSoulé
Occasional Contributor

Thanks so much, we'll take a look at these options and see if they're viable for updating the services. If so, I'll be sure to mark this solved.

Appreciate your help!

0 Kudos