Applications Systems

Web Console Displays “Server Error and Unable to Load Nodes from Database” When Accessing the Monitored Tab in SCM

This is to address an issue where you may experience a Server Error or “Unable to load Nodes from Database” message when navigating to the Server Configuration Monitor (SCM) page under the Monitored tab in the SolarWinds Web Console. The error prevents the page from loading Monitored Nodes Page and may also trigger a pop-up stating “We are having difficulty communicating with the Orion Server.”

First published date

11/4/2025 6:07 PM

Last published date

11/4/2025 6:38 PM

Overview

When opening the SCM Monitored tab, the page fails to load and displays one or more of the following error messages:

  • Unable to load Nodes from Database

  • Server Error – We are having difficulty communicating with the Orion Server.

From Apollo Web API logs, the following exception is logged:

Body:
dataSourceParameters: {"$type":"SolarWinds.Orion.SCM.WebApi.Models.FilteredList.NodeListDataSourceParameters, SolarWinds.Orion.SCM.WebApi.Models","nodeIdFilter":null,"isFilterBlacklist":false,"includeProfileHeaders":true,"filterPropertyValues":[],"searchPhrase":null,"sorting":{"sortBy":"Orion.Nodes|name","sortDirection":"asc"},"pagination":{"pageNumber":0,"pageSize":10}}

System.Data.SqlTypes.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.
   at System.Data.SqlClient.SqlBuffer.get_Int32()

This error indicates that the SCM plugin failed while querying the SQL database, specifically within the BaselineDal.GetBaselineDifferences function, due to unexpected NULL values being returned from one of the SCM database functions or views.

Product section

Server Configuration Monitor

Cause

The issue occurs because one of the SQL functions used by SCM, specifically [dbo].SCM_CalculateBaselineDifferences] was returning a NULL value in a column that the SolarWinds Platform expected to be a valid integer.selines.

As a result, when the Web API attempted to parse the returned dataset, it triggered a SqlNullValueException, which caused the Server Error message to appear in the UI.

Resolution

Resolution:

  1. Create a Backup of the Database.
  2. Connect to the SolarWinds Platform server.
  3. Open Database Manager from the SolarWinds Platform folder of the start menu.
  4. Select Add Orion Server and expand the SQL server in bold.
  5. Right-click the SolarWindsOrion database and select New Query.
  6. Paste the SQL query below into the window on the right and select 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.

IF EXISTS (SELECT 1 FROM [sys].[objects] WHERE [object_id] = OBJECT_ID(N'[dbo].[SCM_CalculateBaselineDifferences]') AND [type] = N'IF')
DROP FUNCTION [dbo].[SCM_CalculateBaselineDifferences]
GO

-- =============================================
-- Function returns baseline status for polled element on node different from baseline at provided time (and returns their status - updated/added/removed).
-- =============================================
CREATE FUNCTION [dbo].[SCM_CalculateBaselineDifferences]
(
    @nodeId int,
    @timeStamp datetime2(7)
)
RETURNS TABLE
AS
RETURN
    -- From baseline comparison select polled elements where content is different or one of file metadata is different.
    -- Only when all file metadata fields in baseline are NULL, ignore file metadata comparison (baseline was created in version prior 2020.2 where we didn't collect file metadata).
    WITH DiffersInContent (PolledElementID, BaselineContentID, CurrentContentID, BaselineVersionID)    
    AS
    (
        SELECT PolledElementID, BaselineContentID, CurrentContentID, BaselineVersionID
        FROM dbo.SCM_GetBaselineComparisonDataForNode(@nodeId, @timeStamp)
        WHERE
            ISNULL(BaselineContentID, 0) <> ISNULL(CurrentContentID, 0) OR
            (
                (
                    ISNULL(BaselineFileAttributes, 0) <> ISNULL(CurrentFileAttributes, 0) OR
                    ISNULL(BaselineOwner, '') <> ISNULL(CurrentOwner, '') OR
                    ISNULL(BaselineUserGroup, '') <> ISNULL(CurrentUserGroup, '') OR
                    ISNULL(BaselineUnixPermissionBits, '') <> ISNULL(CurrentUnixPermissionBits, '') OR
                    ISNULL(BaselineUnixFileMode, '') <> ISNULL(CurrentUnixFileMode, '')
                )
                AND
                (
                    BaselineFileAttributes IS NOT NULL OR
                    BaselineOwner IS NOT NULL OR
                    BaselineUserGroup IS NOT NULL OR
                    BaselineUnixPermissionBits IS NOT NULL OR
                    BaselineUnixFileMode IS NOT NULL
                )
            )
			AND NOT (BaselineContentID IS NULL AND CurrentContentID IS NULL)
    )
    SELECT
        PolledElementID,
        CASE
            WHEN BaselineContentID IS NOT NULL AND CurrentContentID IS NOT NULL THEN 1  -- updated
            WHEN BaselineContentID IS NULL AND CurrentContentID IS NOT NULL THEN 2      -- added
            WHEN BaselineContentID IS NOT NULL AND CurrentContentID IS NULL THEN 3      -- removed
			ELSE 0 -- unknown
        END as DiffType,
        BaselineVersionID
    FROM
        DiffersInContent
  1. Refresh the Web Console and verify that the Monitored tab loads correctly.

If any issue occurs after applying the fix, revert to the previous state by restoring the function backup or using the provided RevertFix SQL script

Here's the RevertFix SQL:

-- 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.

IF EXISTS (SELECT 1 FROM [sys].[objects] WHERE [object_id] = OBJECT_ID(N'[dbo].[SCM_CalculateBaselineDifferences]') AND [type] = N'IF')
DROP FUNCTION [dbo].[SCM_CalculateBaselineDifferences]
GO

-- =============================================
-- Function returns baseline status for polled element on node different from baseline at provided time (and returns their status - updated/added/removed).
-- =============================================
CREATE FUNCTION [dbo].[SCM_CalculateBaselineDifferences]
(
    @nodeId int,
    @timeStamp datetime2(7)
)
RETURNS TABLE
AS
RETURN
    -- From baseline comparison select polled elements where content is different or one of file metadata is different.
    -- Only when all file metadata fields in baseline are NULL, ignore file metadata comparison (baseline was created in version prior 2020.2 where we didn't collect file metadata).
    WITH DiffersInContent (PolledElementID, BaselineContentID, CurrentContentID, BaselineVersionID)    
    AS
    (
        SELECT PolledElementID, BaselineContentID, CurrentContentID, BaselineVersionID
        FROM dbo.SCM_GetBaselineComparisonDataForNode(@nodeId, @timeStamp)
        WHERE
            ISNULL(BaselineContentID, 0) <> ISNULL(CurrentContentID, 0) OR
            (
                (
                    ISNULL(BaselineFileAttributes, 0) <> ISNULL(CurrentFileAttributes, 0) OR
                    ISNULL(BaselineOwner, '') <> ISNULL(CurrentOwner, '') OR
                    ISNULL(BaselineUserGroup, '') <> ISNULL(CurrentUserGroup, '') OR
                    ISNULL(BaselineUnixPermissionBits, '') <> ISNULL(CurrentUnixPermissionBits, '') OR
                    ISNULL(BaselineUnixFileMode, '') <> ISNULL(CurrentUnixFileMode, '')
                )
                AND
                (
                    BaselineFileAttributes IS NOT NULL OR
                    BaselineOwner IS NOT NULL OR
                    BaselineUserGroup IS NOT NULL OR
                    BaselineUnixPermissionBits IS NOT NULL OR
                    BaselineUnixFileMode IS NOT NULL
                )
            )
    )
    SELECT
        PolledElementID,
        CASE
            WHEN BaselineContentID IS NOT NULL AND CurrentContentID IS NOT NULL THEN 1  -- updated
            WHEN BaselineContentID IS NULL AND CurrentContentID IS NOT NULL THEN 2      -- added
            WHEN BaselineContentID IS NOT NULL AND CurrentContentID IS NULL THEN 3      -- removed
        END as DiffType,
        BaselineVersionID
    FROM
        DiffersInContent