Showing posts with label receving. Show all posts
Showing posts with label receving. Show all posts

Monday, March 26, 2012

Latency in Replication Monitor

If my publications are not actively receving any changes on the Publishing
end, will the latency increase ? If there are no transactions/commands
being pushed to the subscriber , then how is latency calculated ? I have
setup replication and its been idle for a few days now and the latency shows
7 secs.. Thanks
latency reflects the last transaction/commands replicated. So 7 secs was the
latency of the last delivered transaction/command.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23tPZ7s38EHA.3012@.TK2MSFTNGP09.phx.gbl...
> If my publications are not actively receving any changes on the Publishing
> end, will the latency increase ? If there are no transactions/commands
> being pushed to the subscriber , then how is latency calculated ? I have
> setup replication and its been idle for a few days now and the latency
shows
> 7 secs.. Thanks
>
|||I have stopped the distribution agent for a day now and the latency still
shows 7 secs.. Shouldnt it have increased ?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:uUziGP68EHA.2900@.TK2MSFTNGP09.phx.gbl...
> latency reflects the last transaction/commands replicated. So 7 secs was
the[vbcol=seagreen]
> latency of the last delivered transaction/command.
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23tPZ7s38EHA.3012@.TK2MSFTNGP09.phx.gbl...
Publishing
> shows
>
|||No, it will only reflect the new latency when you restart it. Then IIRC, it
will reflect a latency of >>7 days.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eSsxsQD9EHA.1392@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> I have stopped the distribution agent for a day now and the latency still
> shows 7 secs.. Shouldnt it have increased ?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:uUziGP68EHA.2900@.TK2MSFTNGP09.phx.gbl...
> the
> Publishing
transactions/commands[vbcol=seagreen]
have
>
|||Hmm.. now what i wanted.. How do you guys prefer to have some replication
monitor alerts.. Im setting up transactional replication and would like to
be alerted if my subscribers are more than 5-10 mins behind my publisher.
Also to note that if the publisher doesnt have any changes to replicate ,
then the alert should not fire.. Please advise
Thanks
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23WwWYeD9EHA.2196@.TK2MSFTNGP14.phx.gbl...
> No, it will only reflect the new latency when you restart it. Then IIRC,
it[vbcol=seagreen]
> will reflect a latency of >>7 days.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:eSsxsQD9EHA.1392@.tk2msftngp13.phx.gbl...
still[vbcol=seagreen]
was[vbcol=seagreen]
> transactions/commands
> have
latency
>
|||I monitor my distribution history tables. If the values in the time column
get beyond a certain point I raise an alert which write the event log. NetIQ
then scrapes the event log and sends out pages.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OV6x6uE9EHA.2804@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Hmm.. now what i wanted.. How do you guys prefer to have some replication
> monitor alerts.. Im setting up transactional replication and would like to
> be alerted if my subscribers are more than 5-10 mins behind my publisher.
> Also to note that if the publisher doesnt have any changes to replicate ,
> then the alert should not fire.. Please advise
> Thanks
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:%23WwWYeD9EHA.2196@.TK2MSFTNGP14.phx.gbl...
> it
> still
> was
I
> latency
>
|||Could you send me the sample query that I could use ?
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eAxUOGQ9EHA.2600@.TK2MSFTNGP09.phx.gbl...
> I monitor my distribution history tables. If the values in the time column
> get beyond a certain point I raise an alert which write the event log.
NetIQ[vbcol=seagreen]
> then scrapes the event log and sends out pages.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:OV6x6uE9EHA.2804@.TK2MSFTNGP15.phx.gbl...
replication[vbcol=seagreen]
to[vbcol=seagreen]
publisher.[vbcol=seagreen]
,[vbcol=seagreen]
IIRC,[vbcol=seagreen]
secs[vbcol=seagreen]
?
> I
>
|||Try something like this
DECLARE @.count int
SELECT @.count = COUNT(max_time) FROM
MSdistribution_agents, (SELECT agent_id, max_time=MAX(time) FROM
MSdistribution_history GROUP BY agent_ID ) AS a
WHERE a.agent_id = MSdistribution_agents.id
AND max_time < DATEADD(d,-1,getdate())
IF @.count >0
BEGIN
DECLARE @.SubscriberName sysname
DECLARE expiringSubscriber_cursor CURSOR FOR
SELECT SubscriberName = (SELECT srvname FROM master.dbo.sysservers
WHERE srvid = subscriber_id) FROM
MSdistribution_agents, (SELECT agent_id, max_time = MAX(time) FROM
MSdistribution_history GROUP BY agent_ID ) AS a
WHERE a.agent_id = MSdistribution_agents.id
AND max_time < dateadd(d,-1,getdate())
ORDER BY 1
OPEN expiringSubscriber_cursor
FETCH NEXT FROM expiringSubscriber_cursor
INTO @.SubscriberName
WHILE @.@.FETCH_STATUS = 0
BEGIN
RAISERROR (50001, 19, -1, @.SubscriberName) with log
FETCH NEXT FROM expiringSubscriber_cursor
INTO @.SubscriberName
END
CLOSE expiringSubscriber_cursor
DEALLOCATE expiringSubscriber_cursor
END
Code Sample 10.2 is an example of the alert Code Sample 10.1 uses.
Code Sample 10.2
IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = 'Expiring
Subscriber Alert'))
-- Delete the alert with the same name.
EXECUTE msdb.dbo.sp_delete_alert @.name = 'Expiring Subscriber Alert'
BEGIN
EXECUTE msdb.dbo.sp_add_alert @.name = 'Expiring Subscriber Alert',
@.message_id = 50001, @.severity = 0, @.enabled = 1, @.delay_between_responses =
60, @.include_event_description_in = 5, @.event_description_keyword =
'Subscriber %s is expiring', @.category_name = '[Uncategorized]'
END
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:O1ge68v9EHA.208@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Could you send me the sample query that I could use ?
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eAxUOGQ9EHA.2600@.TK2MSFTNGP09.phx.gbl...
column[vbcol=seagreen]
> NetIQ
> replication
like[vbcol=seagreen]
> to
> publisher.
replicate[vbcol=seagreen]
> ,
> IIRC,
latency[vbcol=seagreen]
> secs
the[vbcol=seagreen]
calculated
> ?
>