Restoring The DataStore
What happened :
Going happy around in our Citrix farm all hell broke loose… One second everything is going around nicely and the next one all the licenses are vanished. Nothing more in the CMC, all users getting ‘you are using non licensed software’ popups and phones that start ringing.
Off we go to MyCitrix and re-add the licenses. Thank god they’re auto-activating so that should help a lot. Problem is that not all our licenses work… 50% of our client packs are non operative. This means we’re down to half our farm capacity… Not good !
As Licensing calls are free with Citrix (hurrah !) a call is opened but soon the guy on the phone (Euro tech support, USA tech makes you cry in agony) declared this was a database corruption and we could go and fu*k ourselves if we didnt pay.
Sweet
Now what ?
Talked a bit to our vendor who came up with a solution. They continued the call I logged with Citrix Euro support and they got a database with our faulty license entry removed. But then they also started asking for extra money.
Sweet
And ?
Off to the newsgroups, Citrix support sites and stuff like that. We decided to restore a backup from before our licensing problems so that was our procedure, at the same time we’d move from database server as we are consolidating those. Now it’s pretty hard to find much documentation on this issue except a small note in the Advanced Concepts Guide.
Now in the end it all boils down to this :
- See that you get a good copy of your Datastore on an SQL server.
- Open the mf20.dsn file on your citrix server.
- Change the database name to the one you configured.
- Change the server location to your server, preferebly you create a DNS CName for this.
- Open a command line and run the DSMaint application, use the Config argument and provide username, password and the location to the dsn file you just modified. Best practice is to drag & drop this onto your command line to prevent typo’s
- Restart your IMA service
- If you have some servers to do you can throw the DSMaint configuration and service stop and restart (net stop imaservice / net start imaservice) in a batchfile that you run on each server. The dsn file you’ll have to change on every server if it contains a client identifier.
Try this procedure first with a server you don’t really use that much - a live test machine or a management box. When those go smooth (open the CMC and connect to the local server to see if all is ok) you can do the rest.
Rebooting ?
This procedure goes smooth without rebooting a thing. To be safe I restarted the DataCollector in the end. You could also recreate the localhost cache (DSMaint RecreateLHC) to speed up things.








