-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Environment
- SQL Server Version: 15.0.4430.1
- Windows Version: Windows Server 2016 Standard
- Component: SQL Scripts (collector:
procedure_stats_collector/ table:collect.procedure_stats) - Performance Monitor Version: 1.1.0
Describe the Bug
In Collection Health on one of the monitored servers, the collector procedure_stats_collector fails intermittently (not every run). The failure happens when PerformanceMonitor tries to store an object name that appears to be a database-level DDL trigger into PerformanceMonitor.collect.procedure_stats.
I verified that the target column object_name in the PerformanceMonitor database is of type sysname, but the insert/update still fails with a truncation error. The “Truncated value” shown in the error message includes what looks like DDL trigger context/text (e.g., ON DATABASE, FOR DDL_DATABASE_LEVEL_EVENTS), not just the object name.
Steps to Reproduce
- Install/configure PerformanceMonitor and monitor a SQL Server instance.
- Create a database-level DDL trigger with a long name (example below).
- Let PerformanceMonitor run collections until
procedure_stats_collectorexecutes. - Observe that the collector sometimes fails with a truncation error on
collect.procedure_stats.object_name.
Expected Behavior
procedure_stats_collector should complete successfully and store the correct object_name (the object name only, not DDL text/context), even when the object is a database-level DDL trigger with a long name. (Not really sure what is expected when it comes to database triggers and if it is meant to be logged here)
Actual Behavior
procedure_stats_collector fails intermittently. Collection History shows a truncation error against PerformanceMonitor.collect.procedure_stats, column object_name. The “Truncated value” suggests PerformanceMonitor is attempting to store more than just the trigger name (it includes DDL trigger context/text), causing the value to exceed the column length.
Error Messages
16.02.2026 09:00:01 ERROR 0 1092 String or binary data would be truncated in table 'PerformanceMonitor.collect.procedure_stats', column 'object_name'. Truncated value: 'tr_Block_Changes_And_Permissions_LokalSDV_For_Certain_Users
ON DATABASE
FOR DDL_DATABASE_LEVEL_EVE'.
Screenshots
Additional Context
-
The error is intermittent (does not happen on every collection run). Of 335 runs it has failed 191 times.
-
The column
collect.procedure_stats.object_namehas been verified to besysnamein the PerformanceMonitor database. -
The “Truncated value” indicates a DDL trigger is being captured and the stored value contains more than just the trigger name.
-
Example trigger (the object that appears to cause the issue):
CREATE TRIGGER [tr_Block_Changes_And_Permissions_LokalSDV_For_Certain_Users]
ON DATABASE
FOR DDL_DATABASE_LEVEL_EVENTS
AS ... -
Did this work before? If so, what changed? Works on other servers that does not have database trigger
- Is SQL Server Agent running? (Full Edition only) Yes
-
- Are you monitoring Azure SQL DB, Azure MI, or AWS RDS? No