Overview

A previously identified performance issue affecting Silverback, related to PRB39262 and resolved with Silverback 25.4.0.34 Hotfix, may have caused an accumulation of unnecessary data (“clutter”) in the database. While the issue itself is fixed, the residual database clutter is not removed automatically immediately and should be cleaned up to ensure optimal performance. This article explains:

  • Why the cleanup is needed
  • Available cleanup options
  • How to safely remove the clutter data

Why Cleanup is Required

In a standard operating environment, Silverback manages system hygiene through a nightly maintenance task that automatically purges legacy records based on predefined retention settings, which typically default to 90 days. While this ensures that accumulated clutter is eventually cleared without manual intervention, the process can be slow, potentially taking several months to complete if left to the default schedule. One might consider temporarily reducing the retention period to accelerate this cleanup; however, this approach is generally undesirable as it would indiscriminately delete all data within that timeframe, including valid records that need to be preserved. To resolve this issue safely and efficiently, a specialized targeted cleanup option is provided, allowing for the precise removal of specific data without compromising the integrity of the broader retention policy.

Cleanup Option Introduced with the Hotfix

Silverback contains a SQL stored procedure that removes the clutter data created by the issue.

Stored Procedure Details

  • Name: p_DbCleanUp_MdmCommands
  • Location: Database → Programmability → Stored Procedures (in SQL Server Management Studio)

Parameters

  • Retention Days: Example: Using a value of 3 removes clutter data older than 3 days

Optional: Enhanced Stored Procedure Version (Recommended for Large Databases)

An enhanced version of the stored procedure DbCleanUp_MdmCommands_with_batch_size.sql is available, which introduces a new configurable parameter for Batch Size (the number of rows processed per deletion batch). While this functionality will be natively included in all future releases, it is important to note that this script should not be used on systems running versions newer than 25.4.0.34. Applying the provided script to the Silverback database will replace the standard procedure included with the hotfix with this expanded version. Additionally, the batch size parameter can be maintained at its default setting unless specific performance tuning is necessary for your environment

How to Execute the Cleanup

  • Open SQL Server Management Studio (SSMS)
  • Navigate to the Silverback database
  • Locate the stored procedure: p_DbCleanUp_MdmCommands
  • Right-click the procedure
  • Select Script Stored Procedure as → EXECUTE To → New Query Editor Window
  • Adjust the parameter values as needed
    • Depending on the version, you will see either:
    • One parameter (Retention Days), or
    • Two parameters (Retention Days, Batch Size)

Recommended Execution Strategy

Deleting all clutter can take a significant amount of time and may impact database performance.

 

Best practices

  • Always perform a database backup before proceeding with any operation directly on the database
  • Run the procedure overnight or during a weekend
  • Avoid peak business hours

If the issue started, for example, 20 days ago:

  • Run the procedure with Retention = 20
    • This also removes older clutter
    • Observe execution time
  • Run again with Retention = 19
    • This targets the first affected day
    • Execution may take 30–90 minutes, depending on data volume
  • Continue reducing the retention value:
    • Example: 19 → 15 → 10 → 5 → 1
    • Or proceed day by day if more control is needed

You may also choose to run it once with Retention = 1, but this offers less control over execution time.

Monitoring Cleanup Progress

You can use the attached table size monitoring script (run in a separate query window) to track database size and verify cleanup progress while the stored procedure is running.

Summary

  • The performance issue is fixed, but leftover database clutter should be removed
  • Automatic cleanup would take months under default retention settings
  • The provided stored procedure allows safe, targeted cleanup
  • For large environments, incremental execution is strongly recommended