cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 12

Orphaned Limitations clarificaiton

Jump to solution

I just ran a Orion Deployment Health Check and one of the items that came back was to check for orphaned limitations.  It supplied a list of found orphaned limitations and then a KB article to resolve it.  The KB article is MT103094 and here's the URL for it  https://support.solarwinds.com/Success_Center/Orion_Platform/Knowledgebase_Articles/Troubleshoot_orp....

I just need to 100% understand the SQL script before I do anything. 

The KB says to run the following query ...

"DELETE FROM [Limitations] WHERE [LimitationID] NOT IN

(select [LimitationID1] as LimitationID from [Accounts] where [LimitationID1] is not null union

select [LimitationID2] as LimitationID from [Accounts] where [LimitationID2] is not null union

select [LimitationID3] as LimitationID from [Accounts] where [LimitationID3] is not null union

select [LimitationID] as LimitationID from [Views] where [LimitationID] is not null)"

So here's my question, do I enter this SQL query as is or do I need to fill in the limiationIDs that are bad???

Case in point here's one of the orphaned limitation errors "Found orphaned Limitations: Limit the Account based on the Custom Property 'Region' in the 'NodesCustomProperties' table (id: 3)"

Do I need to enter limitationID 3 anywhere in this script or does this script remove the bad entry for limitationID 3?

0 Kudos
1 Solution

The script checks the places a limitation could be used, if any limitationID you have is not in use in any of those places it deletes them all.  One shot and they are all done, no changes needed.

- Marc Netterfield, Github

View solution in original post

2 Replies

The script checks the places a limitation could be used, if any limitationID you have is not in use in any of those places it deletes them all.  One shot and they are all done, no changes needed.

- Marc Netterfield, Github

View solution in original post

Awesome, thank you, that's what I assumed.  I didn't want to make any changes to the DB without fully understanding what I was doing or entering it wrong.

0 Kudos