CVAD - Use SQL command to collect user session records

book

Article ID: CTX695013

calendar_today

Updated On:

Description

Although Citrix Director provide the user session information, customer sometimes still need to set up regular database query tasks to collect the user session records.

For audit requirements, it is more convenient for users to query and save the results regularly from the database.

 

Cause

User session information shows on the Director all are stored in the Citrix Monitoring Database.

User could use the SQL query command to collect the records they needed.

Resolution

Here is an example for Application usage records.

****Replace Citrix2402Monitoring with the name of Monitoring database in customer environment**********************
use 
[Citrix2402Monitoring]

select u.UserName, s.StartDate, s.EndDate, s.UserId, ap.Name, c.ClientAddress, c.ClientName, c.IsReconnect, s.Sessionkey
from [MonitorData].[ApplicationInstance] apin join [MonitorData].[Session] s on apin.SessionKey=s.SessionKey join [MonitorData].[Application] ap on apin.ApplicationId = ap.Id join [MonitorData].[Connection] c on s.SessionKey=c.SessionKey join [MonitorData].[User] u on s.UserId=u.Id
where s.StartDate between '2025-08-01' and '2025-08-07'

Issue/Introduction

Customer wants to collect user session records via SQL query command.