2018年1月17日 星期三

Monitor Replication 複寫監控

Monitor Replication 複寫監控

使用Tracer Token監控複寫延遲
保留延遲紀錄作法請參考我這篇
USE [distribution]
GO
sp_replmonitorhelppublisher
GO
USE [distribution]
GO
sp_replmonitorhelppublication @publisher = N'SQLDEV1'
GO
USE [distribution]
GO
sp_replmonitorhelpsubscription @publisher = N'SQLDEV1', @publication_type = 0
GO
USE [distribution]
GO
sp_replmonitorsubscriptionpendingcmds
@publisher = N'SQLDEV1',
@publisher_db = 'AdventureWorks2008R2',
@publication = 'Orders',
@subscriber = 'SQLDEVSUB1',
@subscriber_db = 'AdventureWorks2008R2',
@subscription_type = 0
GO
Result Sets
Column name Data type Description
pendingcmdcount int The number of commands that are pending for the subscription.
estimatedprocesstime int Estimate of the number of seconds required to deliver all of the pending commands to the Subscriber.

Monitoring Replication with System Monitor (複寫相關效能計數器Performance Counter)
https://docs.microsoft.com/en-us/sql/relational-databases/replication/monitor/monitoring-replication-with-system-monitor
AgentPerformance objectCounterDescription
All agentsMicrosoft SQL Server: Replication AgentsRunningThe number of replication agents currently running.
Snapshot AgentSQL Server: Replication SnapshotSnapshot: Delivered Cmds/secThe number of commands per second delivered to the Distributor.
Snapshot AgentSQL Server: Replication SnapshotSnapshot: Delivered Trans/secThe number of transactions per second delivered to the Distributor.
Log Reader AgentSQL Server: Replication LogreaderLogreader: Delivered Cmds/secThe number of commands per second delivered to the Distributor.
Log Reader AgentSQL Server: Replication LogreaderLogreader: Delivered Trans/secThe number of transactions per second delivered to the Distributor.
Log Reader AgentSQL Server: Replication LogreaderLogreader: Delivery LatencyThe current amount of time, in milliseconds, elapsed from when transactions are applied at the Publisher to when they are delivered to the Distributor.
Distribution AgentSQL Server: Replication Dist.Dist: Delivered Cmds/secThe number of commands per second delivered to the Subscriber.
Distribution AgentSQL Server: Replication Dist.Dist: Delivered Trans/secThe number of transactions per second delivered to the Subscriber.
Distribution AgentSQL Server: Replication Dist.Dist: Delivery LatencyThe current amount of time, in milliseconds, elapsed from when transactions are delivered to the Distributor to when they are applied at the Subscriber.
Merge AgentSQL Server: Replication MergeConflicts/secThe number of conflicts per second occurring during the merge process.
Merge AgentSQL Server: Replication MergeDownloaded Changes/secThe number of rows per second replicated from the Publisher to the Subscriber.
Merge AgentSQL Server: Replication MergeUploaded Changes/secThe number of rows per second replicated from the Subscriber to the Publisher.

沒有留言:

SQL Server Database Mirroring 資料庫鏡像

SQL Server Database Mirroring 資料庫鏡像