need ms sql query to list latest status of dynamic protocol neighbor
1=up
2=down
enjoy
SELECT TOP (1000) [NeighborID]
,[NodeID]
,[NeighborIdentifier]
,[NeighborIPGUID]
,[NeighborIP]
,[ProtocolID]
,[ProtocolStatus]
,[IP_Address_Type]
,[IsDeleted]
,[IP_Version]
,[LastChange]
,[AutonomousSystem]
FROM ['mydatabase'].[dbo].[NPM_RoutingNeighbor]
my final query that gives me what i need:
use SolarWindsOrion;
SELECT
n.NodeID,
n.SysName,
NeighborIP,
m.ProtocolID,
rn.ProtocolStatus,
n.NextPoll,
rpsm.DisplayName,
rpsm.OrionStatus
FROM NPM_RoutingNeighbor rn
LEFT JOIN NPM_RoutingProtocolStateMapping rpsm
ON rn.ProtocolID=rpsm.ProtocolID
AND rn.ProtocolStatus=rpsm.ProtocolStatus
LEFT JOIN Nodes n
ON rn.NodeID=n.NodeID
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.