This post is about replication, you may read some earlier posts for the same. I would like you to go through the same with below links,
This returns pending undistributed commands and estimated processing time for same for particular subscriber and some other parameters passed through the script. This is a same information which returns from subscriber details in the replication monitor as below,
Hope you liked it and stay tuned for more. I will come with another post which have different script to get the same information.
Configuration Replication failure and retry alert-SQL ServerHope you enjoyed above posts and now going ahead to share information about the past of undistributed commands in transaction replication. Let me share a script here which runs against a distribution database on distributor server.
Script to get replication latency and alert in SQL Server
The row was not found at the Subscriber when applying the replicated command - Alternate workaround
Copy nonclustered indexes to subscriber while generating snapshot - SQL Server Replication
USE DISTRIBUTIONAbove execution output is as follows,
GO
EXECUTE sp_replmonitorsubscriptionpendingcmds
@publisher ='publisher', -- Put publisher server name here
@publisher_db = 'publisher_db', -- Put publisher database name here
@publication ='publication', -- Put publication name here
@subscriber ='subscriber', -- Put subscriber server name here
@subscriber_db ='subscriber_db', -- Put subscriber database name here
@subscription_type ='1' -- 0 = push and 1 = pull
This returns pending undistributed commands and estimated processing time for same for particular subscriber and some other parameters passed through the script. This is a same information which returns from subscriber details in the replication monitor as below,
Hope you liked it and stay tuned for more. I will come with another post which have different script to get the same information.
No comments:
Post a Comment
Please Use Good Leanguage