troubleshooting Question

Database Mirroring State Change

Avatar of dbaSQL
dbaSQLFlag for United States of America asked on
Microsoft SQL ServerMicrosoft SQL Server 2005Microsoft SQL Server 2008
12 Comments1 Solution2003 ViewsLast Modified:
I am implementing a script much like the one here in BOL:
http://technet.microsoft.com/en-us/library/cc966392.aspx

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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros