This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE NONCLUSTERED INDEX [IX_pubid_uploadoptions] | |
ON [dbo].[sysmergearticles] | |
( | |
[pubid], | |
[upload_options] | |
); | |
GO | |
CREATE NONCLUSTERED INDEX [IX_uploadoptions_Included] | |
ON [dbo].[sysmergearticles] ([upload_options]) | |
INCLUDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE distribution; | |
GO | |
CREATE INDEX [IX_MSdistribution_history_runstatus] | |
ON [dbo].[MSdistribution_history] ([runstatus]) | |
INCLUDE | |
( | |
[agent_id], | |
[timestamp], | |
[delivery_latency], | |
[time], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [msdb]; | |
GO | |
DECLARE @iPublisher AS sysname; | |
DECLARE @iDistributor AS sysname; | |
DECLARE @iSubscriber AS sysname; | |
DECLARE @iPublication AS sysname; | |
DECLARE @iPublicationDB AS sysname; | |
DECLARE @iSubscriptionDB AS sysname; | |
DECLARE @job_name NVARCHAR(400); | |
DECLARE @cmd NVARCHAR(4000); |