Skip to content

Commit

Permalink
Update Orphaned.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
x-limitless-x authored Aug 24, 2021
1 parent 84eff54 commit 83c82b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SQL Queries/OperationsManager/Orphaned.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--find orphans
-- if anything found run this query: https://github.com/blakedrumm/SCOM-Scripts-and-SQL/blob/master/SQL%20Queries/OperationsManager/Orphaned_Purge.sql
declare @DiscoverySourceId uniqueidentifier;
declare @TimeGenerated datetime;
set @TimeGenerated = GETUTCDATE();
Expand All @@ -25,4 +26,4 @@ INNER JOIN DiscoverySourceToTypedManagedEntity DSTME
ON DSTME.[TypedManagedEntityId] = TME.[TypedManagedEntityId]
AND DSTME.[DiscoverySourceId] = @DiscoverySourceId
WHERE HS.[IsAgent] = 1
AND HSC.[RelationshipId] IS NULL;
AND HSC.[RelationshipId] IS NULL;

0 comments on commit 83c82b9

Please sign in to comment.