Database growth issue : InvHist_Policy_Compliance_Status table
search cancel

Database growth issue : InvHist_Policy_Compliance_Status table

book

Article ID: 153005

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

You are facing database growth issues due to the InvHist_Policy_Compliance_Status table.

Environment

ITMS 8.x

Cause

Every time a compliance check is run for a Managed Software Delivery policy a compliance status update is submitted.

When the new status is updated into Inv_Policy_Compliance_Status a copy of all the existing compliance statuses for that client are added to the InvHist_Policy_Compliance_Status table.

How large the table grows depends on how many MSD policies each client has run, the number of clients running the MSD policies, and how often each compliance check is scheduled to occur for each policy.

Resolution

Possible approaches:

  1. Change configuration so this table grows more slowly:

    This can be done by modifying the MSD policies, so each policy compliance checks are run less often. If the policy check is scheduled to occur during a time range, the check may occur multiple times during that time range. So, changing the policy to check at certain times will reduce the number of times the check is performed, while accomplishing the desired results. If checks are performed at specific times, consider how often these checks need to be performed. Perhaps daily or weekly run will be sufficient.

    Slowing the growth will reduce the work which is done on the various managed computers, and the amount of data they forward to the SMP server, and which the SMP server has to process.

    To see which policies are contributing the most to the recent growth of this table, first use the attached SQL; the second query shows the computers that are the largest recent contributors.
     
  2. Disable the saving of this historical information:

    If you have slowed the growth of this table and it is still growing to rapidly, then you may need to disable the saving of the history for this data class. Note that this history table is used by some reports.

    The history settings can be found in the SMP Console under Settings>All Settings>Notification Server>Resource and Data Class Settings>Resource History>Resource Data History\Data Class>Policy Compliance Status.

    Disable the check box for this data class in the history settings. Note that the existing table is renamed to InvHist_Policy_Compliance_Status_Backup_1 (or something similar). This table is no longer in use and can be deleted/moved to regain space.
     
  3. Slowing the growth of this table, will not reduce the size of this table immediately. The table should eventually shrink through the normal data class purge processes. But if you need to free up this space immediately, then if appropriate precautions are taken, this table can be truncated:

    First perform a complete database backup prior to implementing the following change.

    Second, the query can be used to truncate the table is: TRUNCATE TABLE InvHist_Policy_Compliance_Status

Attachments

InvHist_Policy_Compliance_Status-count-by-resource-1d.sql get_app
InvHist_Policy_Compliance_Status-count-by-policy-1d.sql get_app