Published Date: 21 May, 2019

In the software development lifecycle you have to change database password sometimes. Especially if you are working on a new website or redesigning an existing websites and planning to go live. So before going live ideally we should change the existing databases password.

Sometime you are working on issue reported on production website and you are not able to replicate the same issue on other environments, so you have to restore all the databases to the lower environments. In this case also you have to change the passwords in your local Sitecore websites configuration files.

Earlier (till Sitecore 8.x), it was easy. We just have to change in one file (~/App_Config/ConnectionStrings.config). But in Sitecore 9.X, we have to change at multiple places.

  1. Root Website: ~/App_Config/ConnectionStrings.config
  2. xConnect root: (xConnect)~/App_Config/ConnectionStrings.config
  3. xConnect Index Worker: You will get this application under xConnect website (xxx.xconnect\App_data\jobs\continuous\IndexWorker \App_config\ConnectionStrings.config).
  4. xConnect AutomationEngine: You will get this application under xConnect website (xxx.xconnect\App_data\jobs\continuous\AutomationEngine\App_Config \ConnectionStrings.config)
If you have restored databases from the other environment, you have to change/update the value of the fields (ServerName and DatabaseName) in the following databases and tables:

  • [xxx.Collection.Shard0].[__ShardManagement].[ShardsLocal]
  • [xxx.Collection.Shard1].[__ShardManagement].[ShardsLocal]
  • [xxx.Collection.ShardMapManager].[__ShardManagement].[ShardsGlobal]

http://www.tekkishare.com

Hoping this will help you. Thanks :)