Network Management
Database Maintenance fails on "Finalize Maintenance [ResponseTime]" with "Could not use view or function 'ResponseTime_CS_Detail_legacy' because of binding errors"
This article provides a resolution for database maintenance failing on "Finalize Maintenance [ResponseTime]" due to orphaned legacy views referencing dated tables that no longer exist in the database, resulting in binding errors.
First published date
Last published date
Overview
Symptoms
-
Database maintenance shows failure on ResponseTime in the Deployment Health page.
-
The
swdebugMaintenance.loglocated atC:\ProgramData\SolarWinds\Logs\Orion\shows the following errors:
INFO SolarWinds.Data.DatabaseMaintenance.MaintenanceEngineHelper - Failed to execute 'Finalize Maintenance [ResponseTime]'
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'ResponseTime_CS_Detail_YYYYMMDD'.
Could not use view or function 'ResponseTime_CS_Detail_legacy' because of binding errors.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
...
Error Number:208,State:1,Class:16
-
The same binding error may also appear for
dbo.ResponseTimeview.
Product section
Cause
This issue occurs when the SolarWinds database is in a LegacyToColumnStore transition state. During this transition, old date-partitioned tables (e.g., ResponseTime_CS_Detail_20190131) are migrated to the ColumnStore format and should be dropped afterward.
In some environments, the migration did not fully complete — the dated tables were partially removed, but the legacy views (ResponseTime_CS_Detail_legacy, ResponseTime_CS_Hourly_legacy, etc.) that reference them were left behind. When the database maintenance engine runs the Finalize Maintenance step, it attempts to query through these legacy views, encounters a missing table, and fails with a binding error.
Resolution
DISCLAIMER -- 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.
Please take a full backup of the SolarWinds database before making any changes.
Step 1: Verify the database driver setting
Open SQL Server Management Studio (SSMS) and run the following query against the SolarWinds database:
For platform version 2025.2 and later (including 2026.1):
SELECT [Key], [Value]
FROM dbm_DatabaseProperties
WHERE [Key] LIKE '%Driver%';
For platform versions prior to 2025.2:
SELECT Name, Value
FROM dbm_DatabaseProperties
WHERE Name LIKE '%Driver%';
If the value shows LegacyToColumnStore, the database is confirmed to be in the incomplete transition state. Proceed with the steps below.
Step 2: List remaining orphaned dated tables
SELECT name
FROM sys.tables
WHERE name LIKE 'ResponseTime\_CS\_%\_2%' ESCAPE '\'
ORDER BY name;
This will list any remaining dated tables with the suffix YYYYMMDD. These are the orphaned tables that need to be dropped.
Step 3: Drop orphaned dated tables
Drop all dated tables returned from Step 2. For example:
DROP TABLE [dbo].[ResponseTime_CS_Detail_20190131]
DROP TABLE [dbo].[ResponseTime_CS_Hourly_20190131]
Replace the table names with the actual tables returned from the query in Step 2. This may include ResponseTime_CS_Detail_YYYYMMDD, ResponseTime_CS_Daily_YYYYMMDD, and ResponseTime_CS_Hourly_YYYYMMDD tables.
Step 4: Drop the legacy views
DROP VIEW IF EXISTS [dbo].[ResponseTime_CS_Daily_legacy]
DROP VIEW IF EXISTS [dbo].[ResponseTime_CS_Detail_legacy]
DROP VIEW IF EXISTS [dbo].[ResponseTime_CS_Detail_legacy_U]
DROP VIEW IF EXISTS [dbo].[ResponseTime_CS_Hourly_legacy]
Step 5: Alter the ResponseTime_CS view
Recreate the ResponseTime_CS view to reference only the ColumnStore tables:
ALTER VIEW [dbo].[ResponseTime_CS]
AS
SELECT
[NodeID],
[Timestamp],
[MinResponseTime],
[MaxResponseTime],
[AvgResponseTime],
[PercentLoss],
[Availability],
[Weight]
FROM ResponseTime_CS_Detail WITH (NOLOCK)
UNION ALL
SELECT
[NodeID],
[Timestamp],
[MinResponseTime],
[MaxResponseTime],
[AvgResponseTime],
[PercentLoss],
[Availability],
[Weight]
FROM ResponseTime_CS_Daily WITH (NOLOCK)
UNION ALL
SELECT
[NodeID],
[Timestamp],
[MinResponseTime],
[MaxResponseTime],
[AvgResponseTime],
[PercentLoss],
[Availability],
[Weight]
FROM ResponseTime_CS_Hourly WITH (NOLOCK)
GO
Step 6: Update the database driver
For platform version 2025.2 and later (including 2026.1):
UPDATE dbm_DatabaseProperties
SET [Value] = 'ColumnStore'
WHERE [Value] = 'LegacyToColumnStore';
For platform versions prior to 2025.2:
UPDATE dbm_DatabaseProperties
SET Value = 'ColumnStore'
WHERE Value = 'LegacyToColumnStore';
Step 7: Run Configuration Wizard
Run the Configuration Wizard on the main SolarWinds server. Once it completes successfully, wait for the next scheduled database maintenance cycle or trigger it manually, then verify that the errors are no longer present in the swdebugMaintenance.log.
Additional Notes
-
If the same binding error also appears for CPULoad tables (
Could not use view or function 'CPULoad_CS_Detail_legacy' because of binding errors), follow the same steps above but replace allResponseTimereferences withCPULoadand use the corresponding CPULoad columns (NodeID,Timestamp,MinLoad,MaxLoad,AvgLoad,AvgPercentMemoryUsed,MinPercentMemoryUsed,MaxPercentMemoryUsed,Weight). -
Related: SolarWinds Platform database maintenance consistently fails on "Finalize Maintenance - CPULoad" and "Finalize Maintenance - ResponseTime" — covers a different root cause (partitioned view insert/update failures) but similar symptoms.