Does SQL Server 2005 provide an interface that can be programmatically addressed to determine the health of a mirrored database?
If so, does anyone have examples of how to do so?
Does SQL Server 2005 provide an interface that can be programmatically addressed to determine the health of a mirrored database?
If so, does anyone have examples of how to do so?
For monitoring, querying the sys.database_mirroring DMV is probably the easiest. It contains fields for mirroring_role_desc and mirroring_state_desc.
Link to BOL: http://technet.microsoft.com/en-us/library/ms178655.aspx
The SQL Error log also provides information about these, and there is an event you can catch with SQL Trace as well, I believe.
This video tutorial can give some inputs for your requirement
Video - How to setup Database(DB) Mirroring SQL Server 2005 Tutorial URL - http://wtv.watchtechvideos.com/topic275.html