Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database Mirroring Expand / Collapse
Author
Message
Posted Friday, July 17, 2009 10:42 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 15, 2014 10:24 AM
Points: 424, Visits: 1,049
(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...
Post #754989
Posted Friday, July 17, 2009 11:03 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 9:56 AM
Points: 31,035, Visits: 15,461
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







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #755011
Posted Friday, July 17, 2009 11:50 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 15, 2014 10:24 AM
Points: 424, Visits: 1,049
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.
Post #755046
Posted Friday, July 17, 2009 1:29 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 15, 2014 10:24 AM
Points: 424, Visits: 1,049
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..........
Post #755099
Posted Friday, July 17, 2009 1:30 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 6:34 PM
Points: 750, Visits: 3,159
http://msdn.microsoft.com/en-us/library/cc966392.aspx

I think you want an alert on mirroring state 8.
Post #755102
Posted Friday, July 17, 2009 1:49 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 15, 2014 10:24 AM
Points: 424, Visits: 1,049
yes.
Post #755117
Posted Monday, July 20, 2009 4:18 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 15, 2014 10:24 AM
Points: 424, Visits: 1,049
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.
Post #755636
Posted Monday, July 20, 2009 12:47 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, September 16, 2014 6:34 PM
Points: 750, Visits: 3,159
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.
Post #756116
Posted Tuesday, July 21, 2009 8:37 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, September 15, 2014 10:24 AM
Points: 424, Visits: 1,049
thanks its completed.
Post #756646
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse