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
> ?
>
Showing posts with label publications. Show all posts
Showing posts with label publications. Show all posts
Monday, March 26, 2012
Friday, February 24, 2012
Large number of records in MSMerge_GenHistory
My MsMerge_GenHistory has too many records (currently 1.6 million rows) and I
can't get it to go down.
One of my Merge publications accidentally had Subscription expire in XX days
set to 70 days. My MsMerge_Contents and GenHistory filled up to 1.6 Million
and 1.9 Million records before I caught the error. I have corrected the
Parameter and have been able to get my msmerge_contents down to 28 K rows. I
can't get MsMerge_GenHistory to come down.
I don't want to set every publication that I have to reinitialize. The
publication that had the expiration days parameter problem is a remote
subscriber with a laptop in the field and I don't have access to it on a
daily basis. It is causing me problems with other publications with
subscribers getting unable to process GenHistory messages. I have all of my
remote subscribers set with a QueryTimeout of 4000.
What can I do?
Thank You
Steve
One additional thing.
I noticed that most all of the records in msmerge_genhistory have a pubid of
NULL. A few have a with what looks like a valid guid. Are these records the
problem and can I simply delete them?
Thanks
"Steve" wrote:
> My MsMerge_GenHistory has too many records (currently 1.6 million rows) and I
> can't get it to go down.
> One of my Merge publications accidentally had Subscription expire in XX days
> set to 70 days. My MsMerge_Contents and GenHistory filled up to 1.6 Million
> and 1.9 Million records before I caught the error. I have corrected the
> Parameter and have been able to get my msmerge_contents down to 28 K rows. I
> can't get MsMerge_GenHistory to come down.
> I don't want to set every publication that I have to reinitialize. The
> publication that had the expiration days parameter problem is a remote
> subscriber with a laptop in the field and I don't have access to it on a
> daily basis. It is causing me problems with other publications with
> subscribers getting unable to process GenHistory messages. I have all of my
> remote subscribers set with a QueryTimeout of 4000.
> What can I do?
>
> Thank You
> Steve
|||What will happen if I run this with the Reinitialize Subscribers set to
False? I am trying to not reinitialize all of my subscribers.
I have found that most of my genhistory records, the pubid field is NULL.
Are these the problems and can I simply delete these?
I have a second question about a recommended max number of publications. I
have a database with 40 different publications . Each publication has 138
articles. Between all of these articles, there are in the neighborhgood of 1
million total records published. Some publications have multiple subscribers,
most publications have a single subscriber with all columns published and
static row filters. Most of these subscribers are remote users traveling. Is
this too publications? This topology has saved us from a system wide
reinitialize a couple of times when a particular subscriber has trouble or
simply will not sync in a reasonable timeframe (we have most of our
publications set to expire in 20 days).
Thanks for the help!
Steve
"Paul Ibison" wrote:
> Steve,
> have a look in BOL at sp_mergecleanupmetadata - you could run this to do a
> manual cleanup of the metedata.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>
can't get it to go down.
One of my Merge publications accidentally had Subscription expire in XX days
set to 70 days. My MsMerge_Contents and GenHistory filled up to 1.6 Million
and 1.9 Million records before I caught the error. I have corrected the
Parameter and have been able to get my msmerge_contents down to 28 K rows. I
can't get MsMerge_GenHistory to come down.
I don't want to set every publication that I have to reinitialize. The
publication that had the expiration days parameter problem is a remote
subscriber with a laptop in the field and I don't have access to it on a
daily basis. It is causing me problems with other publications with
subscribers getting unable to process GenHistory messages. I have all of my
remote subscribers set with a QueryTimeout of 4000.
What can I do?
Thank You
Steve
One additional thing.
I noticed that most all of the records in msmerge_genhistory have a pubid of
NULL. A few have a with what looks like a valid guid. Are these records the
problem and can I simply delete them?
Thanks
"Steve" wrote:
> My MsMerge_GenHistory has too many records (currently 1.6 million rows) and I
> can't get it to go down.
> One of my Merge publications accidentally had Subscription expire in XX days
> set to 70 days. My MsMerge_Contents and GenHistory filled up to 1.6 Million
> and 1.9 Million records before I caught the error. I have corrected the
> Parameter and have been able to get my msmerge_contents down to 28 K rows. I
> can't get MsMerge_GenHistory to come down.
> I don't want to set every publication that I have to reinitialize. The
> publication that had the expiration days parameter problem is a remote
> subscriber with a laptop in the field and I don't have access to it on a
> daily basis. It is causing me problems with other publications with
> subscribers getting unable to process GenHistory messages. I have all of my
> remote subscribers set with a QueryTimeout of 4000.
> What can I do?
>
> Thank You
> Steve
|||What will happen if I run this with the Reinitialize Subscribers set to
False? I am trying to not reinitialize all of my subscribers.
I have found that most of my genhistory records, the pubid field is NULL.
Are these the problems and can I simply delete these?
I have a second question about a recommended max number of publications. I
have a database with 40 different publications . Each publication has 138
articles. Between all of these articles, there are in the neighborhgood of 1
million total records published. Some publications have multiple subscribers,
most publications have a single subscriber with all columns published and
static row filters. Most of these subscribers are remote users traveling. Is
this too publications? This topology has saved us from a system wide
reinitialize a couple of times when a particular subscriber has trouble or
simply will not sync in a reasonable timeframe (we have most of our
publications set to expire in 20 days).
Thanks for the help!
Steve
"Paul Ibison" wrote:
> Steve,
> have a look in BOL at sp_mergecleanupmetadata - you could run this to do a
> manual cleanup of the metedata.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
>
>
Labels:
accidentally,
database,
icant,
merge,
microsoft,
million,
msmerge_genhistory,
mysql,
number,
oracle,
publications,
records,
rows,
server,
sql
Subscribe to:
Posts (Atom)