KNOWN ISSUE: ItemVersionData table is growing very large very quickly.

Article:TECH46681  |  Created: 2009-11-10  |  Updated: 2012-12-14  |  Article URL http://www.symantec.com/docs/TECH46681
NOTE: If you are experiencing this particular known issue, we recommend that you Subscribe to receive email notification each time this article is updated. Subscribers will be the first to learn about any releases, status changes, workarounds or decisions made.
Article Type
Technical Solution


Problem



The table ItemVersionData is growing very fast and is taking up a lot of disk space.


Environment



SMP 7.0 SP2, SP3, SP4, & SMP 7.1 SP1+ with Inventory Solution, Software Delivery, and Workflow Solution.


Cause



There are actually a number of possible causes for this problem.  One way to determine what issue you may be seeing is to run the attached SQL script "spSVCGetTasksByType.sql".

"Detailed File Inventory"
This is the first documented cause of the problem, created when Workflow and Inventory were installed together.  An old "Detailed File Inventory" task along with the Workflow "TaskServer DB Fix Schedule" caused the issue.  This was corrected in SP1 for Inventory Solution.

"Download, Execute, Applicability, and Detection Check statuses"
This issue, documented in TECH168522, from Software Management solution, occurs when these checks update the table erroneously, and is exasperated when the check run over and over rapidly.  Most of these related issues were corrected in 7.1 MP1 but there is still one left for SP2.

"OnClientConfig"
This issue, documented in TECH143154, from Software Management solution, occurs when a restricted user saves a policy with no command line and then later adds one, causing an erroneous loop in code execution.  It is resolved in 7.0 MR4. 


Solution




If you are having the first problem, it is very old, and you should update to a newer version of the product.

For the other issues, refer to the linked KB's to stop the table growth.

Finally, once the table growth issue is resolved, you can "purge" data from the tables in the following ways  (first, if possible, take a backup of the DB):

NOTE:  ItemVersions and ItemVersionData should not be truncated.  Doing so will severly damage the SMP installation.

  1. Attached to this KB is a script that removes all versions not used in the last 5 days, called "ItemVersionData(Cleanup).sql".  This should be run with the Altiris Services stoped because it modifies tables themselves, not just the structure.
  2. Recommended: Attached to this KB is an internal script that removes all but the first and last version of a task called ItemVersionData Purge with 1st and last saved.  
  3. This script should be obtained and implemented under support supervision only.
  4. This has been well tested and preserves only the minimum data in the DB, but it can also cause issues with running tasks.  Again, as with the first, all services should be stopped.  This query has a distinct advantage over the other for issues where the table growth has been in the last couple of days.
  5. Several of the listed tables can simply be truncated, including:
    1.  TaskInstances

 

Once you have removed entries from the tables, take another backup of the DB, and then run Shrink DB to recover the actual space from the disk.


Attachments

list items with lots (more than 10) versions
show-items-with-many-versions-4a2.sql (2 kBytes)

Supplemental Materials

SourceDEFECT

Legacy ID



50055


Article URL http://www.symantec.com/docs/TECH46681


Terms of use for this information are found in Legal Notices