Database naming limitation when Citrix Director accesses monitoring data using OData APIs

Database naming limitation when Citrix Director accesses monitoring data using OData APIs

book

Article ID: CTX200325

calendar_today

Updated On:

Description

Trying to access the Citrix Director pages or accessing the database directly over an Open Data Protocol (OData) query fails. The following are some examples on the error message that is encountered:

  • Director pages fail with an 'Unexpected error' message.

  • OData query in the browser fails with the exception message of 'Format of the initialization string does not conform to the specification'.

  • If the Site and the Monitor are in the same database, the site services will also fail.

Note: These errors may also be caused by other issues that are not related to this topic.

Resolution

Name the monitoring database without a whitespace. For Example: instead of naming the monitor database as 'Monitor 01' name it as 'Monitor01'.

For cases where the monitor database already exists, complete the following steps:
  1. Stop the monitor data collection by running -> Set-MonitorConfiguration -DataCollectionEnabled $false.
  2. Rename the database without a whitespace. One way to do this is using SQL Management Studio.
  3. The monitor service now needs to point to the renamed database.


​​​​​​​On the Delivery Controller, using PowerShell, first nullify the Monitor DataStore connection and then point it to the renamed database:

Set-MonitorDBConnection –DataStore Monitor –DBConnection $null
Set-MonitorDBConnection –DataStore Monitor –DBConnection "
Server=Yoursqlserver;Initial Catalog=YourNewMonitoringDBName;Integrated Security=True"

Enable the data collection by running Set-MonitorConfiguration -DataCollectionEnabled $True

IMPORTANT! To get the existing monitor connection string before the renaming process, then use the following command:  Get-MonitorDbConnection


If the monitor service shares the site database, the site database needs to be renamed. See CTX140319 - How to Migrate XenDesktop Database to New SQL Server for a description of steps to shut down access to the site database before renaming.

Problem Cause

When the database has a whitespace in the database name, any Citrix Director queries to the Monitor Service OData API will fail because the OData queries cannot access a database with a space in the name.

Note: This issue can also happen when you  are using port number for SQL in the connection string and there is a whitespace between the database name and the port number.