I have log shipping configured from a primary server to a secondary and I'm trying to get the notifications working when latency occurs. These are set to backup, copy and restore within a 15 minute window.
I've deliberately set up a database that is out of sync in order to test raising latency alerts; viewing the Transaction Log Shipping Status report (the one from the inbuilt standard reports) it is showing 13 minutes since the last log copy and 61900 minutes since the last restore (the logs can't be restored because I've held the first log in the chain aside to test the alerting). The Threshold is set to 45 minutes and the Alert Enabled is showing as True. In addition the Status of the report is showing as "Alert" for that database.
In the SQL Server log Error 14421 is being raised and the message is in line with the above report.
The Log shipping Secondary Server Alert is enabled, and set to Notify Operators, and I have created an operator with my email and set the response to email that operator. Checking the history of the alert, it's showing that it has been raised 33030 times and is being updated everytime the LSAlert job runs in the agent.
Checking the operator, I have my email configured and the operator is enabled. In the notifications it's showing the log shipping Secondary Server Alert sending via email. However, in the history, it's showing that the operator has never been emailed.
I've also tested my database mail and this is sending through.
Anyone able to shed some light on what I'm missing/have failed to set up? Could this be to do with the database mail profiles? Currently I only have a single profile, which is set to public and to be the default profile.
Scratching my head a little on this one now.
If any more info is needed, please let me know and I'll get it together.
Follow me on twitter @EvoDBA
Check out my blog Natural Selection DBA