脚本在分发服务器上执行!我主要使用来监控复制情况.下面是个案例,仅供参考!根据实际情况修
改相关参数 /* 说明:命令在主用用于监控replication性能: 1.分发服务器上执行:
监控复制进程是否运行、发布服务器到分发服务器、分发到订阅服务器传递的命令数; 2.分发服
务器到订阅服务器复制等待情况 */ --
******************************************************************************************
**** --第一部分:监控复制进程是否运行、发布服务器到分发服务器、分发到订阅服务器传递的
命令数 --
******************************************************************************************
**** set nocount on
--新建临时表 create table
#result ( dbname sysname null, name nvarchar(100) not
null, status int NOT NULL, publisher sysname null, publisher_db
sysname null, publication sysname null, start_time datetime
null, time datetime null, duration int NULL, comments nvarchar
(255) NULL, delivered_transactions int NULL, delivered_commands int NULL, delivery_rate int NULL, job_id varchar(36) NULL, delivery_latency int NULL, subscriber sysname null, subscriber_db sysname null, subscription_type int NULL, subscriber_type tinyint NULL, publisher_insertcount int NULL, publisher_updatecount int NULL, publisher_deletecount int NULL, publisher_conflicts int NULL, subscriber_insertcount int NULL, subscriber_updatecount int NULL, subscriber_deletecount int NULL, subscriber_conflicts int NULL, agent_type
nvarchar(4000) ) (编辑:徐州站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|