Determine the desired retention period for file data once a file has reached 0 prevalence (has been removed from the environment). Consult your security team to assess the impact of losing file hashes and their associated history.
Standard Scoping Script
Use the attached ZeroPrevalencePruneScope.sql script to calculate the number of files eligible for Zero Prevalence pruning in your environment. This script is strictly informational and will not remove or modify any data.
Open SQL Server Management Studio and run it as the Carbon Black Service Account.
Paste the contents of ZeroPrevalencePruneScope.sql into a new query window.
Edit line 15 to set your desired retention period.
Example: SET @maxAgeDays = 90;
Execute the query and note the result for Total Files Eligible for Pruning. This represents the total number of files that meet the pruning criteria.
If you run the scope again the next day to track progress, remember to increment @maxAgeDays accordingly (e.g., SET @maxAgeDays = 91;).
Verbose Scoping Script
If the standard script reports 0 files are eligible for pruning, or if you want to understand exactly why specific files are not eligible, use the ZeroPrevalencePruneScope_verbose.sql script. This script is strictly informational and will not remove or modify any data.
Open a new query window and paste the contents of the attached ZeroPrevalencePruneScope_verbose.sql script.
Edit line 18 to set your desired retention period.
Example: SET @maxAgeDays = 90;
Export or save the results of this verbose script and provide them to Technical Support. The support team will use this output to help analyze the pruning blockers.
In additon to pruning zero prevalence files, you can remove Global Approvals for any files that have Zero Prevalence and are within the PurgeAntibodiesPeriodDays specified. This feature requires Server 8.11.0 (or higher).