Database Mirroring

  • (If principle database gows down then mirror database takes the charge.

    Then that time i should get the alert mail with both databases status.)

    I need the sp for this(using above logic).I am using dbmail.

    thanks in advance...:-)

  • If the principal goes down, then you may or may not be able to get a mail.

    http://msdn.microsoft.com/en-us/library/ms408393.aspx

  • Thanks steve,

    I want to prepare the StoredProcedure for minitor mirrored databases.

    It means i should get the alert mails when the mirror database takes the charge.

  • if a principal server suddenly fails, if the mirror server has confirmation from the witness, it can automatically take on the role of principal and make its database available within a few seconds.Then that time i should get the alert mail.

    For that i am preparing monitoring storedprocedure.

    It means if i excute that sp then i should get the mail alert.

    I am not able to implement this logic in that sp.

    any help pls..........

  • http://msdn.microsoft.com/en-us/library/cc966392.aspx

    I think you want an alert on mirroring state 8.

  • yes.

  • i want to store the database mirror state changes in table ,

    can u pls give the query?...............i want to do this through T-sql statements not through GUI.

  • You should be able to set up the alert based on the scripts in that link. The alert can be set to generate the emails you need, and can also run another job which in turn can execute a stored proc to produce whatever information you want to save. You could look at sys.database_mirroring for the state of each database.

  • thanks its completed.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply