cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically send email alerts when one of the mirror servers fails.

Former Member
0 Kudos
2,166

BH Hi, is it possible for the SQL Anywhere 16 to automatically send email alerts when one of the mirroring servers or arbiter fails? If yes, where can i find the instructions for that? Thanks so much. Aron

Accepted Solutions (0)

Answers (1)

Answers (1)

MarkCulp
Participant

There is no automatic method (i.e. method builtin to the SQL Anywhere product) that will send an email when a mirroring failover occurs, but you can easily do this yourself using the tools provided.

Here is one method that you could use to send an email when a failover occurs:

  • create a MirroringFailover event using the CREATE EVENT statement
  • in the event handler SQL code use xp_sendmail to send the email

See the documentation that I have linked for more information. The basic idea is that the MirroringFailover event will be triggered on the new mirroring partner when a failover has occurred. In the event you can do whatever you want: in your case you would simply use xp_sendmail to send the email to the recipient(s). The xp_sendmail documentation page shows an example on how to send email.