Network Management

The column "MinResponseTime" cannot be modified because it is either a computed column or is the result of a UNION operator after upgrading to SolarWinds Platform 2022.1 and above when running SQL Server 2014 and below.

This article provides information about database maintenance error after upgrading to SolarWinds Platform 2022.1 and above when running SQL Server 2014 and below.

First published date

5/3/2024 5:03 PM

Last published date

1/16/2025 10:53 PM

Overview

After upgrading from Orion Platform 2020.2.6 to SolarWinds Platform 2022.1 and above when running SQL Server 2014 and below, the following error message may appear in the database maintenance log:

ERROR SolarWinds.Data.DatabaseMaintenance.Reporter - [Failure] 12.22s Finalize Maintenance - ResponseTime
Message:
--------------------------------------------
dbm_ResponseTime_CS_HourlyToDaily: The column "MinResponseTime" cannot be modified because it is either a computed column or is the result of a UNION operator.

Product section

Network Performance Monitor

Cause

This issue occurs when SolarWinds database is running SQL Server 2014 and below.  This issue does not impact environment running SQL Server 2016 and above.

Resolution

To workaround the issue, please follow the steps below and ensure a full database backup before execution.
  1. Open SQL Server Management Studio (SSMS).
  2. Connect to the SQL Server hosting database.
  3. Select the database and open a new query tab.
  4. Execute the following queries:
     
    WebSiteLoadTime tables:
    -- 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.
    
    DECLARE @sql NVARCHAR(MAX) = '';
    
    SELECT @sql = @sql + 'ALTER TABLE [' + t.name + ']
    ALTER COLUMN [ExecutionTimeSum] BIGINT NULL;' + CHAR(13) + CHAR(10)
      FROM sys.tables t
      INNER JOIN sys.columns c
              ON t.object_id = c.object_id
      INNER JOIN sys.types tp
              ON c.system_type_id = tp.system_type_id
    WHERE t.name LIKE 'WebsiteLoadTime_CS_%'
       AND t.name NOT LIKE '%hist'
       AND t.name NOT LIKE '%cur'
       AND c.name = 'ExecutionTimeSum'
       AND tp.name != 'bigint';
    
    EXEC sp_executesql @sql;

    ResponseTime tables:
    -- 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.
    
    DECLARE @sql NVARCHAR(MAX) = '';
    
    SELECT @sql = @sql + 'ALTER TABLE [' + t.name + ']
    ALTER COLUMN [' + c.name + '] INT NULL;' + CHAR(13) + CHAR(10)
      FROM sys.tables t
      INNER JOIN sys.columns c
              ON t.object_id = c.object_id
      INNER JOIN sys.types tp
              ON c.system_type_id = tp.system_type_id
    WHERE t.name LIKE 'ResponseTime_CS_%'
       AND t.name NOT LIKE '%hist'
       AND t.name NOT LIKE '%cur'
       AND c.name LIKE '%ResponseTime'
       AND tp.name != 'int';
     
    EXEC sp_executesql @sql;
  5. Run database maintenance manually.
     
    https://solarwindscore.my.site.com/SuccessCenter/s/article/How-to-run-the-database-maintenance-manually-in-Orion-environment