"Trim Statistics DB" deletes all MOVEit Central audit records older than a certain number of days, and optionally saves them to tab-separated files.
Input Parameters
DirLog (Required) - The folder into which to write the debug and error logs. During a fresh install, this is set to "\Program Files\MOVEit\MICStats\Logs". Set this to an empty value if you don't want debug and error logs.
DirArchive - The optional folder into which to write the tab-delimited archives. During a fresh install, this is set to "\Program Files\MOVEit\MICStats". Set this to an empty value if you don't want deleted records archived to a text file.
TrimStatsDB_DaysToRetainArchive - The number of days to retain the tab-delimited archive files. Log files older than this number of days found in "\Program Files\MOVEit\MICStats\Logs" (or the value of DirLog) will be deleted. Use this setting carefully as deleted files are not put into the Recycle Bin.
DSNArchive - The optional ODBC DSN into which to save a copy of the records being deleted. During a fresh install, this is set to an empty string, meaning that the delete database records will not be written to another database.
DaysToKeep (Required) - The number of days to retain records. During a fresh install, this is set to 40.
DaysToKeepNoXfers - The number of days to retain TaskRuns records marked "No Xfers". If not supplied, no special action is taken. If you have many tasks that run frequently, you may wish to set this parameter to a small number of days in order to reduce the size of the database and increase its performance. The default is empty, which means no special processing is done for these records.
TrimStatsDB_ArchiveNoXfers - Specifies whether TaskRuns records marked "No Xfers" should be archived or simply discarded. The default is "No," which will prevent archiving of these records."
TrimStatsDB_DaysToKeepAudit - The number of days to retain Audit records. If not supplied, default value of DaysToKeep is used.
TrimStatsDB_DateFormat - The date format MOVEit Central should assume is in use. Usually only used on Windows systems outside the United States. The legal values are MonthDayYear (the default) and DayMonthYear.
TrimStatsDB_CommandTimeout - The number of seconds a client connection to the database will remain active without timing out. The default value is 180 seconds (3 minutes).
Notes
This built-in script should only be run as the first (and only) step of a task. (Process-level per-file or once-after-all-files settings will be ignored.)
Over time, the statistics database can accumulate many records, slowing performance and using megabytes of disk space. To prevent this, MOVEit Central is typically configured to run this built-in script periodically, optionally saving them to a file or another database before deletion.
Beginning with version 3.0, during a fresh install, MOVEit Central began to automatically install and schedule a custom script to perform the same actions detailed here. Beginning with version 3.1.5, the custom script was converted to and replaced with a built-in script that could no longer be viewed or modified but was much easier to upgrade.
Older versions of Trim Statistics DB may have used a parameter named DSNMICStats. If DSNMICStats appears in the task parameter listing it will be ignored and so it is safe to delete it.
Example #1
Bob has noticed that the various task history dialogs in MOVEit Central have been "sluggish" lately and asks Ipswitch for some advice. Ipswitch notices that Bob has more than two hundred tasks that "poll" FTP servers every five minutes, all day long. Most (98%) of these polls do not yield files, but MOVEit Central will faithfully log this information during each poll. Over the course of a single day, this means that more than 55,000 "no xfer" actions will have been logged to the database. Bob knows that "no xfer" information can be of value in debugging, but Ipswitch would prefer he remove them after a few days and only retain "success" or "failure" audit entries for long periods of time. Bob and Ipswitch settle on retaining one week of "no xfer" records, and still decide to keep a full 60 days of "success" and "failure" logs in the database. He will not save the "no xfer" records to the longer term archive logs.
To accomplish this with MOVEit Central, Bob should...
Select his existing "Trim Stats DB" task, which already has a process and schedule.