Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a mirrored SQL server setup with a pair of LTM's holding the mirror VIP. We're trying to setup a health monitor that runs a query against both servers in the mirror and directs traffic to the principal. Right now we have a query running that should only be possible on the active side of the mirror, but it's showing that both nodes are green. Any ideas?

share|improve this question
    
Any updates? Im looking to do the same thing. Im thinking it would need a query of a specific DB. Im thinking along this line - exec sp_dbmmonitorresults [DB Name] If the Role returns a 2 its passive. If 1 its active. Make sense? –  user107302 Jan 17 '12 at 16:31

1 Answer 1

SELECT mirroring_role_desc FROM sys.database_mirroring WHERE database_id=(Your database number) --expected response = 'MIRROR' or 'PRINCIPAL'
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.