Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 A Tough One...

Author  Topic 

bigjake
Starting Member

1 Post

Posted - 2008-10-14 : 06:40:50
Hello,

I'm selecting data which monitors server interface 'up/down' status. To do so, our monitoring app polls two distinct physical interfaces (a main and a failover) and stores the operational status of each in different rows within an 'Interfaces' table. The table stores interface status data for a large number of servers. Each interface row contains a value of 'NodeID', so for every server we possess, the Interfaces table will possess two rows, and only two, containing the same NodeID value.

What I need to do is periodically check the table, ascertain if BOTH interfaces' status is 'down', correlate that there are two rows possessing identical NodeID values, both of which show interface status as 'down'--then output that NodeID so that our operations staff know to go check the server.

Whew....

Any ideas?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-10-14 : 06:45:45
[code]SELECT nodeID
FROM Interfaces
WHERE [Status] = 'down'
GROUP BY nodeID
HAVING COUNT(*) >= 2[/code]


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -