"String or binary data would be truncated" error when creating or modifying a Custom Rule, Policy, Approval or a Ban
book
Article ID: 287259
calendar_today
Updated On:
Products
Carbon Black App Control (formerly Cb Protection)
Issue/Introduction
When modifying existing Policies, Rules, Approvals or Bans, the following error is displayed:
String or binary data would be truncated in table 'das.dbo.config_list'
Some other error messages for the same issue include:
PARITY_SERVER_ERROR
Error changing reputation setting: DB Error: String or binary data would be truncated
Environment
App Control Server: All Supported Versions
Cause
When a Configlist entry (Custom Rule, Approval, Ban, etc) is created and associated with a specific Policy (or Policies) this creates a State Group mapping.
There is a character limit of 2048 for these State Group mappings in the Das database. Even if a Policy is removed from a Rule, the State Group mapping will remain.
Resolution
Run SQL Server Management Studio as the Carbon Black Service Account.
Execute the following query to check if there are any state_group mappings getting close to the 2048 limit:
USE das; SELECT state_groups, len(state_groups) [SG Length] FROM dbo.host_groups_state_groups WITH (nolock) ORDER BY [SG Length] DESC
If any State Group returned has a Length of 1900 or more: open a case with Support to request the scripts to scope unused State Group Mappings and prune them.
Additional Information
The root cause is an overreliance on Custom Rules/Approvals per-Policy (as opposed to All Policies), which leads to a large number of State Group Mappings.
There is a limit on how many mappings a Policy can have to a Rule or Approval.
Even if a Policy is removed from a Custom Rule in the UI, the State Group Mapping remains.