Select to view content in your preferred language

Updata database connection ArcGIS Server

371
7
08-14-2024 02:00 AM
LiveHus
Emerging Contributor

Hello 🙂

I am currently in a migration process where we have two parallel HA environments installed on 10.8.1. We have used webgisdr to migrate the content from environment A to B which was successful. However, we are also migrating to a new database, but are having issues with updating the database connection. 

The process to update the underlying connection string involves importing the new SDE connection file under the Site -> Data Stores tab for the existing registered data store entry, and restarting the services. To my understanding the services should be restarted with a new database instance, but unfortunately the services are still connected to the old database when we examine the database icon:

LiveHus_0-1723625879338.png

This has not been an issue previously.

Does anybody have any experience with updating the .sde connection file or any idea on how to move forward in troubleshooting this?

Thank you

0 Kudos
7 Replies
MichaelVolz
Esteemed Contributor

You need to update the SDE connection in the Pro project that is the source of the mapservice as well.

0 Kudos
LiveHus
Emerging Contributor

Thank you for your response. So in other words, all the services must be republished with the new connection string as a source? Shouldn't this be updated automatically after restarting the services?

0 Kudos
MichaelVolz
Esteemed Contributor

That has not been the case in my experience.  Luckily my org does not have too many mapservices, so it was practical to perform this task manually.  There are scripting options out there (python), but if you don't have too many services, it might just be faster to do this manually.

0 Kudos
LiveHus
Emerging Contributor

Thanks for sharing. We have experienced that we don't need to script and the connection is updated after restarting. However, the last time we updated the database connection all the services was published with ArcMap runtime. Now, all the services are republished with ArcGIS Pro. My concern is that ArcGIS Server 10.8.1 is incapable of automatically updating the connection string in documents published with Pro. 

0 Kudos
Asrujit_SenGupta
MVP Regular Contributor
0 Kudos
LiveHus
Emerging Contributor

Thank you for this, it sure helps and I think it will be the solution 🙂 However, the script requires you to have the old DSID. Since I replaced the existing Data Store connection with the new instance when testing my initial workflow, the old dsid is overwritten. In other words I should have added the new database connection and not replace it. Does anyone know how to retrieve the old DSID?

0 Kudos
Asrujit_SenGupta
MVP Regular Contributor

@LiveHus wrote:

To my understanding the services should be restarted with a new database instance, but unfortunately the services are still connected to the old database when we examine the database icon.


I think it's just showing you the old label for the SQL instance, however the services are actually updated. If you read the comments in the previous link I shared, it discusses the same. Check here.

 

Maybe as a test, stop the services for the old database and check whether the Map services are working properly or not.

0 Kudos