Network Management

Run SQL query to update node EngineID in SolarWinds Platform

Nodes are assigned to an incorrect polling EngineID. Orphaned EngineID in the NodesData table. Nodes are not polling. Not receiving data for nodes after migration or hostname change of polling engine.

First published date

11/8/2018 8:37 PM

Last published date

7/23/2025 9:47 PM

Overview

After a failed migration, nodes are assigned to incorrect EngineID and may cause polling issues in the environment. This article describes how to correct the issue by running a SQL query on the database.

Product section

Orion Platform

Cause

  • Improper migration or failed migration attempt.
  • Changing the hostname of a SolarWinds Platform poller.

Sample Error in OrionWeb.log

2021-09-21 11:23:54,631 [26] (11) ERROR Orion_Nodes_Add_Default - (null) System.ServiceModel.FaultException`1[SolarWinds.Orion.Core.Common.CoreFaultContract]: ProvideFault failed, check fault information. (Fault Detail is equal to SolarWinds.Orion.Core.Common.CoreFaultContract(Unknown): System.ArgumentOutOfRangeException: Engine Id 3 does not exist
Parameter name: EngineId


 

Resolution

Identify the "correct EngineID" and the "Incorrect EngineID"

  1. Open Database Manager, and open the Engines table
  2. Run the following 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 TOP 1000 * FROM [dbo].[Engines]

 

  1. Take note of the information under EngineID column 

In a multi-poller environment, you may see more than one EngineID in this table. In this example, the EngineID to take note is '1'.
 

Update the nodes with incorrect EngineID 

a) Open another table in Database Manager, NodesData

  1. Run the following query, changing @CorrectID to match the Engines table ( Important this example will change all nodes on your SolarWinds Platform to a single Engine, where the correct ID is EngineID=1), a scenario where only one Engine ID on your environment and no  Additional Polling Engines(APE).
    -- 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.
    
    UPDATE NodesData SET EngineID = @CorrectID WHERE EngineID != @CorrectID

  1. Note  the !=1  means "not equal to" - if mass changing   a specific number it should be left out, and if run in SQL Server Management Studio,  single quotes are required around the number   such as = '1'  or ='3'


With the information noted in the first screenshot, we changed @CorrectID with the number 1 to match the Engines table

Note. If your environment has more than one Polling Engine, the script will look like this:

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

UPDATE NodesData SET EngineID = (Correct Engine ID) WHERE EngineID = (Incorrect Engine ID)