Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE distribution;
- GO
- --Track the throughput per minute
- SELECT CONVERT(SMALLDATETIME, t.entry_time) AS EntryTime,
- COUNT(1) AS Commands
- FROM MSrepl_commands cmds
- INNER JOIN MSarticles a ON a.article_id = cmds.article_id
- INNER JOIN MSrepl_transactions t ON cmds.xact_seqno = t.xact_seqno
- GROUP BY CONVERT(SMALLDATETIME, t.entry_time)
- ORDER BY CONVERT(SMALLDATETIME, t.entry_time) DESC;
- --Track the throughput per article, per minute
- SELECT a.article,
- CONVERT(SMALLDATETIME, t.entry_time) AS EntryTime,
- COUNT(1) AS Commands
- FROM MSrepl_commands cmds
- INNER JOIN MSarticles a ON a.article_id = cmds.article_id
- INNER JOIN MSrepl_transactions t ON cmds.xact_seqno = t.xact_seqno
- --WHERE a.article = 'SuspectedTable'
- GROUP BY a.article, CONVERT(SMALLDATETIME, t.entry_time)
- HAVING COUNT(1) > 1000
- ORDER BY CONVERT(SMALLDATETIME, t.entry_time) DESC;
Add Comment
Please, Sign In to add comment