Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 High Availability (2005)
 Getting e-mail notification...

Author  Topic 

agustin
Starting Member

3 Posts

Posted - 2007-07-10 : 22:57:22
Hello,

I am a C++/C# developer my SQL skills are very limited.
I have a database set up for mirroring and I would like to get an e-mail whenever an Automatic Failover occurs. Can anyone show me how to do this using SQLServer 2005? Please provide me with T-SQL code sample to accomplish this task!

Thanks in advance!

-Agustin

b.veenings
Yak Posting Veteran

96 Posts

Posted - 2007-07-11 : 15:34:13
setting oup mirrors also creates a job for as far as i know, look if there is an job that is created to failover. put in there the notify.



Need an SQLDB consultant?
check www.veeningsengineering.nl
Go to Top of Page

agustin
Starting Member

3 Posts

Posted - 2007-07-11 : 21:27:11
Setting up database mirroring does not create a job! Any other sugestion? Thanks!

-Agustin
Go to Top of Page

b.veenings
Yak Posting Veteran

96 Posts

Posted - 2007-07-12 : 03:03:47
do you use a whitness server also? or only 2 servers so you have to failover manually?

Need an SQLDB consultant?
check www.veeningsengineering.nl
Go to Top of Page

b.veenings
Yak Posting Veteran

96 Posts

Posted - 2007-07-12 : 03:18:26
look @ http://msdn2.microsoft.com/en-us/library/ms408393.aspx there is all the info about monitoring mirroring and configuring it.

Need an SQLDB consultant?
check www.veeningsengineering.nl
Go to Top of Page

agustin
Starting Member

3 Posts

Posted - 2007-07-12 : 09:03:25
Veenings,

Thanks for your help!

I have created a WMI event alert that triggers when the DB Mirror changes state then attached to it a job that sends me e-mail. Now everytime the Mirroring state changes I get an e-mail notification.

Thanks,

-Agustin
Go to Top of Page
   

- Advertisement -