I'm seeing an issue with the dbm_Pollers_DeleteOrphans stored procedure. The second delete statement is failing because there is a group of sequential pollers in the Pollers table with NetObject set to N:None and another sequential group set to N: . As the procedure is trying to CAST(SUBSTRING(NetObject, 3, 10) AS int), it's failing each and every time. Anyone have any idea how a set of pollers could've been created with a NetObjectID of 0 and NetObject N:None? Are these safe to delete?
Stored Procedure Delete Query
DELETE FROM Pollers
WHERE (SUBSTRING(NetObject, 1, 1) = 'N')
CAST(SUBSTRING(NetObject, 3, 10) AS int) IN (SELECT NodeId FROM DeletedNodes)
CAST(SUBSTRING(NetObject, 3, 10) AS int) NOT IN (SELECT NodeID FROM Nodes)
Query to Discover CAST errors
WHERE SUBSTRING(NetObject, 1, 1) = 'N'
AND ISNUMERIC(SUBSTRING(NetObject, 3, 10)) = 0
Output of Discovery Query
Thanks in advance for any assistance!
Jack Vaughan, Jr.
Systems Monitoring Engineer