There are many different ways to use exMon, some customers value historic information while others are primarily focused on recent or current information.
For those that do not value historic information deleting older information can improve exMon performance as well as reduce the storage required for the exMon installation.
Clearing exMon execution data
For most customers, execution data is only relevant for a couple of months, and deleting older executions can greatly reduce the size of your exMon database. With that being said we prefer to err on the side of caution and recommend not deleting data more recent than the past 6 months.
To delete older execution data exMon ships with a stored procedure called usp_maint_cleanup_exec_history with the parameters @number_days_to_keep and @keep_rows_in_history.
- @number_days_to_keep is an integer value and as the name suggests decides the number of days of data that is kept and is by default set to 180 days
- @keep_rows_in_history is a bit value that decides if data is stored in a historic table or if data is completely removed. By sending in the value 0 the data is completely removed but by sending in the value 1 the data is kept while still improving exMon performance.
Clear exMon execution data by executing the stored procedure like this:
exec [dbo].[usp_maint_cleanup_exec_history] @number_days_to_keep ,@keep_rows_in_history
This stored procedure can be executed through exMon package and scheduled to regularly run.
Furthermore, you can Clear old exceptions to reduce database size