After moving your SQL Server instance to a new server, this guide will show you how to update your ArcGIS Server services. Additionally, it will demonstrate how to update file-based services that use data from a file geodatabase, such as map and image services, after the network share has changed.
Scenario
It might be necessary for you to move your SQL Server geodatabase to a different server. The 2022 instance, for instance, might be on a different server when you upgrade from SQL Server 2019 to SQL Server 2022. With a database backup and restore, moving the geodatabase is simple. However, what about updating your ArcGIS Server services? The services will use the SQL instance name if they are referencing information from your enterprise geodatabase. This can be fixed by re-mapping the data sources in your Pro Projects/MXDs, and then re-publishing your services. But what if you have dozens, or hundreds, of services? This can be extremely time consuming. The below video will show how you can update all of your services with a couple of python scripts.
Note:
Before executing the scripts, be sure you have made a copy of the \arcgisserver\config-store\services and \arcgisserver\directories\arcgissystem\arcgisinput directories.