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?

link|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? – JFR Jan 17 at 16:31
feedback

1 Answer

SELECT mirroring_role_desc FROM sys.database_mirroring WHERE database_id=(YOur database number)

--expected response = 'MIRROR' or 'PRINCIPAL'

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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