Network Management
Failed Execution of 'Summarize hourly data [VoipOperationResults] Violation of PRIMARY KEY constraint 'PK_VoipOperationResultHealthStats_Daily'. Cannot insert duplicate key in object 'dbo.VoipOperationResultHealthStats_Daily'."
This article addresses an issue encountered during database maintenance where summarizing hourly data for VoIP operation results fails.
First published date
Last published date
Overview
During the execution of database maintenance, specifically the procedure dbm_VoipOperationResults_Summary, users may encounter errors in the swdebugMaintenance.log file.
ERROR: SolarWinds.Data.DatabaseMaintenance.StandardTableHandlerDAL - Failed to execute procedure: dbm_VoipOperationResults_Summary System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_VoipOperationResultHealthStats_Daily'. Cannot insert duplicate key in object 'dbo.VoipOperationResultHealthStats_Daily'. The duplicate key value is (Month Day Year Time, XXX, X). The statement has been terminated.
Product section
Cause
Resolution
Important! Before proceeding, ensure you have a recent backup of your SolarWinds Platform database.
- Download Script: Download the script from this [link ].
- Backup Stored Procedure: Using SSMS, save the original version of the stored procedure [dbo].[dbm_VoipOperationResults_Summary] located under SolarWinds DB > Programmability.
- Run Script: Using MS SQL Server Management Studio, execute the downloaded script, "80_SP_VoipOperationResults_SummaryFix.sql," on your SolarWinds Platform database.
- Run Database Maintenance: Run the database maintenance process again. For detailed instructions, refer to [this article ].
- Verify Resolution: Review the Database Maintenance logs located at 'C:\ProgramData\SolarWinds\Logs\Orion\swdebugMaintenance.log' to confirm if the error persists.