Network Management
"Failed to execute procedure: dbm_VolumeUsage_DetailToStatistics Arithmetic overflow error for type smallint" causing database maintenance to fail after upgrading to SolarWinds Platform 2024.4.1 and below
The database maintenance shows an error containing "Failed to execute procedure: dbm_VolumeUsage_DetailToStatistics Arithmetic overflow error for type smallint" or "Detected that operation [Compute baseline statistics]-[VolumeUsage] failed 3 times in a row". This does not stop DB maintenance but should still be cleaned up.
First published date
Last published date
Overview
In the swdebugMaintenance.log, database maintenance will fail with the following error message:
ERROR SolarWinds.Data.DatabaseMaintenance.StandardTableHandlerDAL - Failed to execute procedure: dbm_VolumeUsage_DetailToStatistics System.Data.SqlClient.SqlException (0x80131904): Arithmetic overflow error for type smallint, value = X. The statement has been terminated
WARN SolarWinds.Data.DatabaseMaintenance.OrionNotificationHelper - Detected that operation [Compute baseline statistics]-[VolumeUsage] failed 3 times in a row.
Product section
Cause
This issue occurs in multiple SolarWinds Platform releases where the VolumeUsage data cannot be cleaned up when the value exceeds 100.
Resolution
To resolve the problem, run the following SQL statement to identify the Node and Volume in question and delete the problematic data. Once the data is properly cleaned up, SolarWinds is recommending to upgrade to SolarWinds Platform 2025.1 and above to prevent the problem from occurring again.
Resolution 1
- Open Database Manager
- Click Add default server
- Right-click on SolarWinds Database > New Query
- Paste the below queries
- Click Execute query
-- Scripts are not supported under any SolarWinds support program or service. -- Scripts are provided AS IS without warranty of any kind. SolarWinds further -- disclaims all warranties including, without limitation, any implied warranties -- of merchantability or of fitness for a particular purpose. The risk arising -- out of the use or performance of the scripts and documentation stays with you. -- In no event shall SolarWinds or anyone else involved in the creation, -- production, or delivery of the scripts be liable for any damages whatsoever -- (including, without limitation, damages for loss of business profits, business -- interruption, loss of business information, or other pecuniary loss) arising -- out of the use of or inability to use the scripts or documentation. SELECT [N].[NodeID], [N].[Caption], [V].[VolumeID], [V].[Caption], [V].[VolumePercentUsed] FROM [Volumes] [V] JOIN [Nodes] [N] ON [N].[NodeID] = [V].[NodeID] WHERE [VolumePercentUsed] > 100
When you know the Node and volume, manually check if the volume is larger than 100. If so, delete if necessary.
To delete you can search Manage Nodes, Search for affected Node name,
From the above Query you will have this similar information
Example:
Node ID / Node Name / VolumeID /Volume Name / Percentage
92 Server1 271 C:Label:22D6826F 128.281235
Expand the resources for the node, in order to list the volumes, and select the affected Volume (VolumeName), and select Delete
Resolution 2
- Open Database Manager
- Click Add default server
- Right-click on Orion Database > New Query
- Paste the below queries
- Click Execute query
a. SQL Query 1
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation
SELECT [NodeID] ,[VolumeID] ,[DateTime] ,[DiskSize] ,[AvgDiskUsed] ,[MinDiskUsed] ,[MaxDiskUsed] ,
[PercentDiskUsed] ,[AllocationFailures] ,[Archive] ,[Weight] FROM [dbo].[VolumeUsage]
WHERE [PercentDiskUsed] > 100
b. SQL Query 2
-- Scripts are not supported under any SolarWinds support program or service.
-- Scripts are provided AS IS without warranty of any kind. SolarWinds further
-- disclaims all warranties including, without limitation, any implied warranties
-- of merchantability or of fitness for a particular purpose. The risk arising
-- out of the use or performance of the scripts and documentation stays with you.
-- In no event shall SolarWinds or anyone else involved in the creation,
-- production or delivery of the scripts be liable for any damages whatsoever
-- (including, without limitation, damages for loss of business profits, business
-- interruption, loss of business information, or other pecuniary loss) arising
-- out of the use of or inability to use the scripts or documentation
SELECT [N].[NodeID], [N].[Caption], [V].[VolumeID], [V].[Caption], [V].[VolumePercentUsed] FROM [Volumes] [V] JOIN [Nodes] [N] ON [N].[NodeID] = [V].[NodeID] WHERE [VolumePercentUsed] > 100
From the results, look for the value that was displayed in the SwdebugMaintence.log. Kindly see the sample log below.
ERROR SolarWinds.Data.DatabaseMaintenance.StandardTableHandlerDAL - Failed to execute procedure: dbm_VolumeUsage_DetailToStatistics
System.Data.SqlClient.SqlException (0x80131904): Arithmetic overflow error for type smallint, value = 204803.218750
From the screenshot, we can see that VolumeID: 321 is showing PercetDiskUtilization of 20480.219. Hence, we would need to delete VolumeID: 321.