Changing Citrix Farm information with Dsmaint

The Data Store Maintenance (dsmaint) utility is used to "Perform various configuration tasks for the IMA data store".

I have used this utility to change make changes to how a citrix server accesses the citrix sql database, to change the server that houses the database and to recreate a corrupted local host cache on a citrix server.

Citrix can be an intimidating application to work with, mainly because support is very lacking. Sadly, I have many times searched for days on the citrix support forums and not found answers to my problems or found that the fix was a custom patch made for a specific client.

Having said that, citrix is a powerful and robust suite which provides companies with many features.

Changing the SQL server which houses the farm database.

After the database has been migrated to a new sql server, you will need to tell the citrix serers where to connect to get their information.

To do this, edit the mf20.dsn file, located in one of the following paths depending on your system architecture;

  • C:\Program Files\Citrix\Independent Management Architecture\
  • C:\Program Files  (x86)\Citrix\Independent Management Architecture\

Change the "SERVER=sqlServerName" so that it lists the new sql server and save the file.

Then open a command prompt, I usually do this with administrative privileges, and run the following command.

dsmaint config /pwd:<password> /dsn:"<path_to_mf20_dsn>"

replacing the password with the correct password to connect to the new sql server and replacing  the path_to_mf20_dsn to the correct path for your system.

Once complete, you should receive a message indicating that the changes were applied and to restart the IMA service. Restart the IMA service.

Should you receive an error running the dsmaint utility, double check the following;

  • You have the proper path to the mf20.dsn file
  • Ensure there are no firewalls preventing connectivity to the sql server
  • Ensure that the password you are using is correct for the UID listed in the mf20.dsn file.

If you have problems restarting the IMA service, read on...

The Local Host Cache (LHC) exists for two reasons;

  • Permits a server to function in the absence of data store connectivity.
  • Improves performance by caching information used by ICA Clients for enumeration and application resolution

I have seen several situations where the LHC has become corrupt. If you have problems restarting the IMA service after making changes, use the dsmaint utility to recreate the lhc.

dsmaint recreatelhc

Once complete, start the IMA service.

 

 

Leave a Reply