Keep That Run History Under Control!

I expect that learning to keep the Run History under control is something that most MIIS designers have learnt through unpleasant experience. But in case you haven’t, a brief overview.

The Run History is stored in the MicrosoftIdentityIntegrationServer database, and contributes massively to the growth the database. If you don’t regularly delete the Run History, your DB files will grow and grow until the disk is full. When this happens you’re in big trouble – MIIS will no longer be able to do anything. Clearing the History also requires large amounts of free space on the volume holding the transaction log file. This file needs to be expanded in the clearing process – and the more you’re trying to clear, the more disk space will be needed. I have even heard a story about someone who had to install an extra disk on the MIIS server just to provide this expansion space!

So now you know how important it is to keep on top of this, how much Run History should you keep? Personally I would say no more than two days. The data in it is actually not that useful – if you try and inspect an old Export, for example, MIIS will show you the object as it appears now, rather than how it looked at the time of the Export. A far better bet is to generate export and import logs as part of your Run Profiles, and keep those for as long as the business requires.

The best way to clear Run History is by using MIISClearRunHistory from the MIIS Resource Toolkit. This will allow you to create a little batch file which you can set to run overnight from the Windows Scheduler.

miisclearrunhistory.exe /pr:2 /l:2

This command will create a log file, and my final tip is that you should monitor that file! Find out whatever monitoring system is available that can handle a log file (I’m most familiar with Sitescope, but I expect there’s plenty of other options) and set a watch on that file!