Friday, August 03, 2012 9:33 PMI am trying to find out how I can query information to get durations for previous runs of my merge agents. The behavior I am seeing is once the agent completes (scheduled to run every 15 minutes) the MSmerge_history table is empty but replication monitor still shows "Not Synchronizing" and the previous duration from the last run. Where is that pulling from? My retention for the distirbutor is set to MIN=12 hrs and MAX=72 hours but ut sayd that is for transactions, I am not sure where you set retention for agent history
Friday, August 03, 2012 9:35 PMI found the history retention on the distributor and it was zero so I changed that to 24 hours, but I am still wondering where replication monitor pull s that last duration history information from
Friday, August 03, 2012 9:57 PMModeratorWhere are you seeing the duration column? A pic would be nice.
looking for a book on SQL Server 2008 Administration? http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search? http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
Friday, August 03, 2012 10:04 PM
Hey Hilary, I think I figured it out, the duration in replication monitor is pulling from msmerge_sessions (Duration column) and not msmerge_history. I changed the history retention which pushing a snapshot from 0 to 2 days and now all the history is in place as well as the session information. I was pushing 50 simultenaous snapshots was wanted a way to query the duration as we have varying bandwidth to our subscribers. I was able to come up with the following
select a.publication, a.subscriber_db, s.session_id, s.duration/60 as DurationMinutes from msmerge_sessions s INNER JOIN msmerge_agents a ON a.id = s.agent_id inner join msmerge_history h on h.session_id = s.session_id where h.comments like 'Applied the snapshot%' order by a.subscriber_dbThe problem I was having was because the history retention on the distributor was set to 0 be default
- Marked As Answer by Chad Churchwell Sunday, August 05, 2012 8:45 PM