Network Management

Troubleshoot orphaned limitations in SolarWinds Platform products

Deployment Health or Active Diagnostics detects orphaned limitations in your SolarWinds Platform products.

First published date

11/29/2018 5:29 PM

Last published date

12/10/2025 12:40 AM

Overview

This article will address an issue highlighted by Deployment Health or Active Diagnostics related to the Check for orphaned limitations. The message indicates that you may delete these records from the database because they may cause performance issues and further log errors.
 

Resolution: Delete orphaned limitations from database.
Explanation: Found orphaned Limitations...

Product section

Orion Platform

Cause

Orphaned limitations reference object (i.e. nodes) which are no longer present in the database.

Resolution

Note: If you delete limitations, your users might see data that was not previously available to them. To mitigate this, please ensure the correct limitations are created and assigned to the user before fixing the corrupted limitations. Alternatively, you can disable the user, fix the limitation corruption and assign new limitations, then re-enable the user.

To remove orphaned limitations from the SolarWinds Platform, follow the steps below:

  1. Create a database backup.
  2. RDP to the main polling engine.
  3. Stop all services using the SolarWinds Service Manager (Default location: C:\Program Files (x86)\SolarWinds\Orion\StopNetPerfMon.exe)
    1. In environments with multiple polling engines, the SolarWinds Services need to be stopped on all engines.
    2. In environments with high availability, Disable HA in the command prompt first to prevent an unexpected failover.
  4. Open the Database Manager (Default location: C:\Program Files (x86)\SolarWinds\Orion\DatabaseManager.exe).
  5. Click Add Orion Server
  6. Expand the SQL Server (i.e., SolarWinds database in bold)
  7. Right-click the database and Select New Query
  8. Paste and execute the following query in the window on the right: 
-- 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.
--
DELETE FROM [Limitations] WHERE [LimitationID] NOT IN
(
SELECT DISTINCT [LimitationID1] AS LimitationID FROM [Accounts] WHERE [LimitationID1] IS NOT NULL
UNION
SELECT DISTINCT [LimitationID2] AS LimitationID FROM [Accounts] WHERE [LimitationID2] IS NOT NULL
UNION
SELECT DISTINCT [LimitationID3] AS LimitationID FROM [Accounts] WHERE [LimitationID3] IS NOT NULL
UNION
SELECT DISTINCT [LimitationID] AS LimitationID FROM [Views] WHERE [LimitationID] IS NOT NULL
)

update [Views] set LimitationID = null
where LimitationID is not null and LimitationID not in
(select l.LimitationID from [Limitations] l)


update [Accounts] set LimitationID1 = null
where LimitationID1 is not null and LimitationID1 not in
(select l.LimitationID from [Limitations] l)


update [Accounts] set LimitationID2 = null
where LimitationID2 is not null and LimitationID2 not in
(select l.LimitationID from [Limitations] l)


update [Accounts] set LimitationID3 = null
where LimitationID3 is not null and LimitationID3 not in
(select l.LimitationID from [Limitations] l)


DELETE l FROM Limitations l
left join LimitationTypes lt on l.LimitationTypeID = lt.LimitationTypeID where lt.[LimitationTypeName] is null
  1. Start all services on all polling engines using the Service Manager, and re-enable high availability.