Manually clean the database of Citrix Resource Manager
Citrix Resource Manager is a component has been available for years in the Enterprise edition of Citrix XenApp. Although the version 5.0 product no longer exists (replaced by EdgeSight), is still widely used in many situations, thanks to the add-ons like Web Interface for Resource Manager Jason Conger.
In installations that have been working for several years is likely to remain within the database of data on servers that no longer exist or duplicate names of servers that have been reinstalled or changed their domain. In these cases it is necessary a little 'cleaning by hand.
Here, then, that Citrix gives us a nice document on its knowledge base in which he explains to delete the data related to the old server name. This is some piece of code to run within the SQL Query Analyzer on the database located in the Resource Manager.
With an initial query extracts the numeric identifier associated with the server:
Select a.PK_SERVERID as 'ServerNumber', b.servername, c.netdomain as Domain
from LU_SERVER a, LU_SERVERNAME b, lu_netdomain c
where b.PK_SERVERNAMEID = a.FK_SERVERNAMEID and a.FK_NETDOMAINID = c.PK_NETDOMAINID
It 'should take note of ServerNumber server that interests us and replace it in the following piece of code:
DECLARE @serverid int
SELECT @serverid = N'SERVERNUMBER'
delete from sdb_clienthistory where FK_SDB_SESSIONID IN (select pk_sdb_sessionid from sdb_session where fk_serverid = @serverid)
delete from sdb_apphistory where fk_serverid = @serverid
delete from sdb_connectionhistory where fk_serverid = @serverid
delete from sdb_eventlog where fk_serverid = @serverid
delete from sdb_metrics where fk_serverid = @serverid
delete from sdb_process where fk_serverid = @serverid
delete from sdb_session where fk_serverid = @serverid
delete from sdb_alerts where fk_serverid = @serverid
delete from lu_server where pk_serverid = @serverid
At this point you just have to delete some records in the table LU_SERVERNAME:
Delete from LU_SERVERNAME PK_SERVERNAMEID where not in (select from FK_SERVERNAMEID LU_SERVER)
For more information:
Other articles on similar topics:
- Web Interface for Resource Manager Roadmap
- From the Resource Manager all'EdgeSight: Migration Guide
- When the reboot is not working: Citrix Resource Manager
- Project Mobius: get the beta version 2.1
- Citrix Integration Utility for XenApp XenAppPrep / Presentation Server
- Search problems on Citrix products
- Citrix User Profile Manager V1 release - Technology Preview
