Howto move your XenApp Datastore (SQL)
We’re currently decommissioning our W2K3 servers. Part of the process is to move the datastore to a W2K8R2/SQL2008R2 server. Easy job, documented well. Here’s to another document about it 😎
First run a full backup of your database on the source SQL server. Copy the .bak file to your target SQL server. On the target SQL server create a new database (remember the name). Restore the backup to the newly created database. Select ‘Overwrite the database’ in your restore options, else you’ll get an error.
After your restore is completed create a sql login that is db_owner to your datastore. You can limit these permissions to db_reader and db_writer, however every time you update your farm you will need to change these permissions back to db_owner. So I guess it’s not recommended.
Now that your SQL work is done you can start migrating your servers. It’s not a tough job. Just get a MF20.dsn file (%programfiles(x86)%\Citrix\Independent Management Architecture folder) of a random XenApp server and edit it with notepad to insert the new connection data. Below the contents of my MF20.dsn file.
Now one-by-one logon to your servers. Perform the following sequence:
net stop imaservice /y
Stop IMA and it’s dependencies
copy [path_to_new]\mf20.dsn %programfiles(x86)%\citrix\independent management architecture /y
Copy the new mf20.dsn and overwrite the old one
dsmaint config /user:[sql_login] /pwd:[sql_password] /dsn:"C:\Program Files (x86)\CITRIX\Independent Management Architecture\mf20.dsn"
Connects IMA to the datastore. Gives a succes or failed message
Recreates the Local Host Cache
net start imaservice
That’s all there is to it.
Update: I wrote a powershell script to automate this process. You can download it if you are logged in.