Test the connection by executing the below powershell command let.
a. asnp Citrix*.
b. Get-logDataStore
c. Get-MonitorDataStore
d. Get-command Get*servicestatus
e. Execute all the commands retrieved by Get*servicestatus to expect "OK" for all FMA services
If any of FMA services or Datastore values return DBunconfigured nullify and set connection strings relevant to FMA service in error.
Detailed description to perform the above steps:
1. Nullify the connection strings on the controller
Set-AnalyticsDBConnection -DBConnection $null -force
Set-AppLibDBConnection -DBConnection $null -force
Set-OrchDBConnection -DBConnection $null -force
Set-TrustDBConnection -DBConnection $null -force
Set-HypDBConnection -DBConnection $null -force
Set-ProvDBConnection -DBConnection $null -force
Set-BrokerDBConnection -DBConnection $null -force
Set-EnvTestDBConnection -DBConnection $null -force
Set-SfDBConnection -DBConnection $null -force
Set-MonitorDBConnection -DataStore Monitor -DBConnection $null -force
Set-MonitorDBConnection -DBConnection $null -force
Set-LogDBConnection -DataStore Logging -DBConnection $null -force
Set-LogDBConnection -DBConnection $null -force
Set-ConfigDBConnection -DBConnection $null -force
Set-AcctDBConnection -DBConnection $null -force
Set-AdminDBConnection -DBConnection $null -force
2. Reconfigure connection strings
## Replace <dbserver> with the New SQL server, and instance if present
## Replace <dbname> with the name of your restored Database
## Note: AdminDBConnection should be first
$ServerName="<SQL server Name>"
$SiteDBName = "<DbName(case sensitive)>"
$LogDBName = "<LoggingDbName>"
$MonitorDBName = "<MonitorDbName>"
$cs="Server=$ServerName;Initial Catalog=$SiteDBName;Integrated Security=True"
$csLogging= "Server=$ServerName;Initial Catalog=$LogDBName;Integrated Security=True"
$csMonitoring = "Server=$ServerName;Initial Catalog=$MonitorDBName;Integrated Security=True"
Set-AdminDBConnection -DBConnection $cs
Set-ConfigDBConnection -DBConnection $cs
Set-AcctDBConnection -DBConnection $cs
Set-AnalyticsDBConnection -DBConnection $cs
Set-HypDBConnection -DBConnection $cs
Set-ProvDBConnection -DBConnection $cs
Set-AppLibDBConnection -DBConnection $cs
Set-OrchDBConnection -DBConnection $cs
Set-TrustDBConnection -DBConnection $cs
Set-BrokerDBConnection -DBConnection $cs
Set-EnvTestDBConnection -DBConnection $cs
Set-SfDBConnection -DBConnection $cs
Set-LogDBConnection -DBConnection $cs
Set-LogDBConnection -DataStore Logging -DBConnection $csLogging
Set-MonitorDBConnection -DBConnection $cs
Set-MonitorDBConnection -DataStore Monitor -DBConnection $csMonitoring
3. Reboot the controller and run Automatic site upgrade again
4. If this doesn't resolve, run the manual site upgrade and run the Upgrade Scripts generated on the SQL database in SQLCMD mode.
Problem Cause
DB connection strings were missing on multiple DDC