oqueck (Flexera Software) asked a question.
Best Answer
To preserve formatting, the solution to this forum post has been moved to this article: https://community.flexera.com/s/article/History-table-deletion-scripts-Solution-to-Forum-Post

oqueck (Flexera Software) asked a question.
Best Answer
To preserve formatting, the solution to this forum post has been moved to this article: https://community.flexera.com/s/article/History-table-deletion-scripts-Solution-to-Forum-Post


Hello Oliver,
Deleting compliance computer records could take days and eventually cause locks if other activities happen (inventory import).
One approach is to use the script above and schedule a SQL server agent that will run every day from 10:00 AM to 5:00 PM (typically out of the inventory import time). Will select the top 5 million records... deleting by batches of 50K, with a commit every 50K records, to avoid a growth in log files. This is the first attached document.
Another approach that is way more efficient (extremely fast) is attached in the second script: this approach makes sense if the cleanup must be massive and impact potentially several billions of records. The approach is the following:
The interest of the scriptare the following
and you get for free an FNMS Inventory Computer cleanup script