I am implementing a script much like the one here in BOL:
To monitor/alert/record mirroring state changes. Ultimately, I am inending to invoke my own failover automatically, based on the state changes of the principal. (high performance, no witness server)
But right now, I'm wondering -- the text says:
' This script assumes that you are creating the alert on the mirror or principal server instance. '
Wouldn't I need to implement this on BOTH the principal and mirror? Say I implement the table on both instances, and enable the state recording via an Agent job. The job will be disabled on the principal, and enabled automatically, upon failover. Such that it's only active on the current principal at any time.
I have an agent job now, which enables/disables the Agent jobs, based on a procedure which checks sysjobs/syscategories for @databasename.
The particular script I've referenced above, from BOL -- I can/should put it into both instances... yes?