Creating The XenApp 6.5 Datastore in SQL Server 2008 R2



All XenApp 6.5 farm configuration is stored in a database, known as the IMA Data Store. During the creation of the Data Store, the database where the Data Store will be stored must already exist. In this blog post we will look at how to create the database where you can store data for the IMA Data Store. We will also look at the different components which are, in one way or another, related to the XenApp database, and how they function.

If you want to just read on how to create the XenApp 6.5 database on SQL Server 2008 R2, just skip to the “Creating the Data Store” section.

IMA (Independent Management Architecture)

IMA stands for the Independent Management Architecture, and provides the framework for all server-to-server communication that occurs in a XenApp farm. A service called IMAService runs on all XenApp servers and its the key communication component of a farm. IMA is for example used for communication between AppCenter and the different XenApp servers. Such as when you want to disconnect a user from a particular server, then that will be communicated to the designated server through IMA.

Other examples of IMA usage is when the Data Collector polls for load on different XenApp servers, or when XenApp servers retrieve data from the Data Store, to their Local Host Cache. IMA communicates by default over TCP port 2512. But if you want to perform remote actions on servers from AppCenter, then those actions will be performed over TCP port 2513.


Data Store

The XenApp farm configuration is stored in a database residing on a SQL or Oracle Server. All static information about the farm, such as amount of servers, published applications, defined farm administrators and so on, is stored in this database. When you create the farm, you are prompted to provide credentials of the user who will authenticate to the data store, during creation of it. When farm administrators make a change in the farm configuration, such as adding more administrators, that information is written to the database. Whenever that occurs, credentials of the user designated to authenticate to the data store, will be used to add the information to the database.

You can check who the designated user for database updates is, by opening the mf20.dsn file, which you can by default find at the following location C:\Program Files (x86)\Citrix\Independent Management Architecture
DBexplain1

The password of this user will be stored on XenApp servers, in encrypted manner, in the registry.


Local Host Cache

All XenApp servers have an Access database known as the Local Host Cache. Its a file called imalhc.mdb, located at C:\Program Files (x86)\Citrix\Independent Management Architecture. The Local Host Cache contains a subset of the information found in the IMA Data Store. It has two primary functions;

  1.  Permit a XenApp server to function even if a connection to the IMA Data Store is not present
  2.  Improve performance by caching information locally, which the XenApp server refers to when ICA Clients make application enumeration requests

When a XenApp server joins the farm, its LHC is populated with a subset of information from the data store. The IMA service on the XenApp server, will then periodically check for (or be notified of) updates in the Data Store, and pull any updates to the LHC. If the Data Store is unreachable for the XenApp servers, the LHC contains enough information about the farm to allow normal operations for an indefinite period of time, if necessary. However, no new static information can be published, or added to the farm, until the farm data store is reachable and operational again.


Creating the Data Store

1. Open SQL Server Management Studio console. Click Start > All Programs > Microsoft SQL Server 2008 R2 > SQL Server Management Studio

2. Provide credentials for a Database Engine Services Administrator, choose the correct server, and click connect.
XaDB1

3. Right-click Databases, and select New Database
XaDB2

4. Enter a database name. You can also set the Initial Size and Autogrowth for both Primary Filegroup and the log file, if you like. I’m just keeping the default settings.
XaDB3

5. Click Ok, and the database will be created.
XaDB4

6. Expand Security, then right-click Logins and choose New Login
XaDB5

7. Click on Search, then choose the user account you want to designate to data store authentication process. Remember to choose a domain account.
XaDB6

8. The designated user only needs to be a member of the Domain Users group. Its the database permissions the user has, that are important. We will set the database permissions in the next step.
XaDB7

9. Next click on User Mapping, and make the selections I have chosen. Make the chosen user account db_owner of the XenAppDB, then change Default Schema to dbo by using the browse button(s).  The user account for installing, upgrading, or applying hotfixes to the data store must have database owner (db_owner) rights to the database.
XaDB8

10. Finally click on OK.

Additional Resources
Data Store Database Reference SQL Server
Function of the Local Host Cache

4 Comments

  1. Pingback: Installing Citrix XenApp 6.5 » ShabazTech

  2. Sabine

    Been trying hard to find this information. Finally someone took time to explain it. Not everybody know their way around sql server.

    Reply
  3. Infotek Services

    Thanx a lot..

    Reply
  4. Erica B

    Appreciate this post.

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload the CAPTCHA.