1. Click Studio->Configuration to check the current SQL Server
2. Take snapshot for all the DDCs and SQL Servers
3. Backup the Site , Monitoring and Logging database Successfully
4. Go to DDC and Open PowerShell to run the command to check the ghost sessionkey
Asnp Citrix*
Get-BrokerSession | Select username, Machinename, Sessionkey
5. Go to Site Database to check the following tables, and Delete records with sessionkey you check in step 4
[CitrixSiteDBName].[chb_State].[Sessions]
[CitrixSiteDBName].[chb_State].[Licenses]
[CitrixSiteDBName].[chb_State].[BrokeredSessions]
You need to Create New query in the menu of SQL Server Management Studio and Input SQL Command like this
Delete From [[CitrixSiteDBName].Chb_State.Sessions Where Sessinkey=’xxxxxxxxxxxxxx’ and username=’xxx’
Select SQL CMD Mode and Click Execute