April 23, 2008 at 7:47 am
I have been looking at the built in replication alerts and seem to have a problem with the transactional replication thresholds.
In replication monitor if i go to warnings and agents, the "warn if latency exceeds threshold" is ticked, and the threshold set to 30 seconds.
What seems to happen is if the latency is above 30 seconds i get the little hazard warning, which is fine. However i would like to be alerted of this happening.
This leads me to look at the builtin alerts, namely, Replication Warning: Transactional replication latency (Threshold: latency) - error 14161. So ive set the alert to email me if it gets raised. all ok there.
however, in the history its never been raised?? So am i looking at the wrong alert, or is there something else i need to do?
I tried to alter the message to make sure the "with log" was true, but i cant change it as its a system message, which is fine.
I tried running raiserror(14161,16,1) and i get the email through, so i know the alert is working, when its fired.
Anyone else come across this problem or can point me in the right direction?
regards
John
April 28, 2008 at 10:02 am
Ok ive done some further work on this today and have written a quick job to just check the table every 5 minutes and alert me if any of the jobs have a threshold warning. If anyone wants to use it you can...
declare @cnt int
select @cnt = (select count(agent_name) as Affected_Agents from distribution.dbo.MSreplication_monitordata with (nolock)
where status = 3 and warning = 2)
if @cnt > 0
Begin
exec msdb..sp_send_dbmail @recipients = 'abc@myComp.co.uk',
@subject = 'WARNING - PERFORMANCE THRESHOLD ALERT!!!',
@query = 'set nocount ON select agent_name as Affected_Agents from distribution.dbo.MSreplication_monitordata with (nolock)
where status = 3 and warning = 2'
End
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply