May 27, 2006 - Citrix    Comments Off on Refresh/recreate the Citrix Local Host Cache

Refresh/recreate the Citrix Local Host Cache

Refresh the Local Host Cache

If the IMA service is currently running but published applications do not appear correctly in ICA Client application browsing, force a manual refresh of the local host cache by executing dsmaint refreshlhc from a command prompt on the affected server. This action forces the local host cache to read all changes immediately from the data store. A discrepancy in the local host cache occurs only if the IMA service on a server misses a change event and is not synchronized correctly with the data store.

Recreate the Local Host Cache

If the IMA service does not start, the cause may be a corrupt LHC.

Recreating the Local Host Cache after a minimum of SP1 has been installed:

Important: The data store server must be available for  dsmaint recreatelhc  to work. If the data store is not available, the IMA service will fail to start.

  • Stop the  IMA service  on the MetaFrame server, if it is started. This can be done via the command line, net stop imaservice, or from services.
  • From the command line run:  dsmaint recreatelhc  which renames the existing LHC database, creates a new database and modifies the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\Runtime\PSRequired key

to a value of “1”.

Setting the value  PSRequired  to 1 forces the server to establish communication with the datastore in order to populate the Local Host Cache database. When the IMA service is restarted, the LHC is recreated with the current data from the data store.

Restart the  IMA service . This can be done via the command line, net start imaservice, or from services.

OR

To recreate the LHC database on servers that do not have a minimum of SP1 installed, follow these steps to manually recreate the LHC:

  • Verify the data store is available before beginning this procedure. If the data store is not available, the IMA service fails to start until the data store is available.
  • Stop the  IMA service  on the MetaFrame server, if it is started. This can be done via the command line, net stop imaservice, or from services.
  • Go to  %ProgramFiles%\Citrix\Independent Management Architecture  and rename the  imalhc.mdb  to  imlhc.mdb.bak
  • Launch the  ODBC Data Source Administrator :
    • On Windows 2000, choose  Control Panel > Administrative Tools > Data Sources (ODBC)
    • On TSE, choose  Control Panel > ODBC Data Sources
    • Select the  File DSN  tab and browse to  %ProgramFiles%\Citrix\Independent Management Architecture
  • Select the  imalhc.dsn  file and click  Configure
  • In the  Database  area, click  Create. The  New Database  dialog box appears.
  • In the  Database Name  box, type the name  imalhc.mdb  for the new local host cache database.
  • Click  OK  to create the database, and then click  OK  to close the ODBC Data Source Administrator.
  • Open  regedt32  and navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\RUNTIME

and modify the value of  PSRequired (REG_DWORD): 0x1

  • Restart the  IMA service. This can be done via the command line, net start imaservice, or from services.

IMPORTANT : Restarting the IMA service instead of rebooting might cause the SNMP service to Dr. Watson if SNMP is enabled.