Guest User

Untitled

a guest
Oct 18th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. USE distribution;
  2. GO
  3. --Track the throughput per minute
  4. SELECT CONVERT(SMALLDATETIME, t.entry_time) AS EntryTime,
  5. COUNT(1) AS Commands
  6. FROM MSrepl_commands cmds
  7. INNER JOIN MSarticles a ON a.article_id = cmds.article_id
  8. INNER JOIN MSrepl_transactions t ON cmds.xact_seqno = t.xact_seqno
  9. GROUP BY CONVERT(SMALLDATETIME, t.entry_time)
  10. ORDER BY CONVERT(SMALLDATETIME, t.entry_time) DESC;
  11.  
  12. --Track the throughput per article, per minute
  13. SELECT a.article,
  14. CONVERT(SMALLDATETIME, t.entry_time) AS EntryTime,
  15. COUNT(1) AS Commands
  16. FROM MSrepl_commands cmds
  17. INNER JOIN MSarticles a ON a.article_id = cmds.article_id
  18. INNER JOIN MSrepl_transactions t ON cmds.xact_seqno = t.xact_seqno
  19. --WHERE a.article = 'SuspectedTable'
  20. GROUP BY a.article, CONVERT(SMALLDATETIME, t.entry_time)
  21. HAVING COUNT(1) > 1000
  22. ORDER BY CONVERT(SMALLDATETIME, t.entry_time) DESC;
Add Comment
Please, Sign In to add comment