It’s been 9 months since I last posted and have been really very busy with customer projects. I’m going to start a new blogging entry by talking about the ConnectionLog SQL table from the XenDesktop 5 datastore. Currently I’m supporting a customer on-site and assisting them to troubleshoot some users connection issue. By looking at the chb_State.ConnectionLog table in the SQL database, I can check the past history of all the virtual desktop connections for the past 2 days and the connection failures, if any. The connection failures are indicated in the table column ConnectionFailureReason and has an integer value possibly from 0 to 5:

0 – Connection is successful
1 – Failure to prepare session
2 – VDA registration timeout
3 – Connection timeout
4 – Connection failure due to licensing
5 – Connection failure due to ticketing

The other columns BrokeringUserUid and WorkerUid can be referenced to the UID from AccountNames and WorkerNames tables to obtain the user account ID and VM hostname.

By default, the connection history logs are stored for 2 days before being purged by the XenDesktop Broker Service. However this can be changed by creating the registry entry ‘HKLM\Software\Policies\CitrixDesktopServer\Logging\ConnectionLogLifetimeHour’ of type DWORD on the DDC servers. The value is define in hours (default is 48 hours).

Lastly I want to mention a great tool that you can use to easily extract diagnostic data from the database. This tool is called XDDBDiag and the latest version 2.3 can be download from CTX128075. Using this you can also do a consistency data check on your XD5 database and outputs data like the connection logs into comma-separated value (.csv) files located in a compressed file (.zip).