Error ID XDDS C46CE32B You may be unable to run Automatic or Manual Site Upgrade from Citrix Studio during an upgrade of XenApp

book

Article ID: CTX236060

calendar_today

Updated On:

Description

You may be unable to run Automatic/Manual Site Upgrade from Citrix Studio during an upgrade from XenApp 7.6 LTSR CU4 to XenApp 7.15 LTSR CU2
The upgrade fails with following exception

Error Id: XDDS:C46CE32B
 
Exception:
    Citrix.Console.Models.Exceptions.ScriptException Cannot validate argument on parameter 'DatabaseName'. The character length (0) of the argument is too short. Specify an argument with a length that is greater than or equal to "1", and then try the command again.
 

DesktopStudio_ErrorId : UnknownError

    Sdk Error Message : Cannot validate argument on parameter 'DatabaseName'. The character length (0) of the argument is too short. Specify an argument with a length that is greater than or equal to "1", and then try the command again.

    Sdk Error ID : ParameterArgumentValidationError,Citrix.Monitor.Sdk.Commands.GetMonitorDBVersionChangeScriptCommand

    ErrorCategory : NotSpecified

    DesktopStudio_PowerShellHistory : GetDatabaseUpgradeScriptsScript

    mm/dd/yyyy hr:mm:ss AM/PM

   

    Get-ConfigRegisteredServiceInstance  -AdminAddress "localhost" -MaxRecordCount 1

    Get-ProvInstalledDBVersion  -AdminAddress "<servername.domainname:80>" -Upgrade

    Get-ProvDBVersionChangeScript  -AdminAddress "<servername.domainname:80>" -DatabaseName "<Database name>" -TargetVersion "7.6.3000.0"

    Get-HypInstalledDBVersion  -AdminAddress "<servername.domainname:80>" -Upgrade

    Get-HypDBVersionChangeScript  -AdminAddress "<servername.domainname:80>" -DatabaseName "<Database name>" -TargetVersion "7.6.3.0"

    Get-MonitorInstalledDBVersion  -AdminAddress "<servername.domainname:80>" -DataStore "Site" -Upgrade

    Get-MonitorDBVersionChangeScript  -AdminAddress "<servername.domainname:80>" -DatabaseName "<Database name>" -DataStore "Site" -TargetVersion "7.6.2000.0"

    Get-BrokerInstalledDbVersion  -AdminAddress "<servername.domainname:80>" -Upgrade

    Get-BrokerDBVersionChangeScript  -AdminAddress "<servername.domainname:80>" -DatabaseName "<Database name>" -TargetVersion "7.6.3000.0"

    Get-MonitorInstalledDBVersion  -AdminAddress "<servername.domainname:80>" -DataStore "Monitor" -Upgrade

    Get-MonitorDBVersionChangeScript  -AdminAddress "<servername.domainname:80>" -DatabaseName "" -DataStore "Monitor" -TargetVersion "7.6.1000.0"

     : Cannot validate argument on parameter 'DatabaseName'. The character length (0) of the argument is too short. Specify an argument with a length that is greater than or equal to "1", and then try the command again.

            + CategoryInfo : InvalidData: (:) [Get-MonitorDBVersionChangeScript], ParentContainsErrorRecordException

            + FullyQualifiedErrorId : ParameterArgumentValidationError,Citrix.Monitor.Sdk.Commands.GetMonitorDBVersionChangeScriptCommand


 

Resolution

Please follow these steps to identify the issue on Delivery controller:
  1. Open elevated PowerShell (Run as administrator)
  2. Run asnp citrix.*
  3. Run Get-MonitorDbconnection to get the DBconnection string. Please make a note of the connection string
  4. Run Get-MonitorDatastore to get the details for each of the Monitor DataStores
The output may be as shown in this example:

ConnectionString : Server=Servername;Initial Catalog=<Database name>;Integrated Security=True
DataStore            : Site
DatabaseType     : SqlServer
Provider               : MSSQL
SchemaName      : Monitor
Status                   : OK

ConnectionString : Server=Servername;Initial Catalog=;Integrated Security=True
DataStore            : Monitor
DatabaseType     : SqlServer
Provider               : MSSQL
SchemaName      : MonitorData
Status                  : OK​
 
As highlighted above the database name is missing for Monitor DataStore

Please follow these steps to resolve the issue:
 
 
  1. Run PowerShell cmd let: Set-MonitorDbconnection  -Datastore "Monitor" -Dbconnection $null 
  2. Run Set-MonitorDbconnection  -Datastore "Monitor" -Dbconnection "connection string"​ and reboot the Delivery controller

Note: Replace the connection string with the one identified in step 3 while identifying the issue.
 


 

 

Problem Cause

The issue occurred as the Database name is null in the command as seen in the exception and highlighted below:

  Get-MonitorDBVersionChangeScript  -AdminAddress "<servername.domainname:80>" -DatabaseName "" -DataStore "Monitor" -TargetVersion "7.6.1000.0"