标签:sql server
查看日志文件,未提交的事务
dbcc loginfo
复制多线程
操作-->日志读取器借进作业属性-->运行代理-->-SubscriptionStreams 4
查看同步数据差异
--在分发服务器执行
USE distribution SELECT ‘EXEC distribution.sys.sp_replmonitorsubscriptionpendingcmds @publisher = N‘‘‘+a.publisher+ ‘‘‘, @publisher_db = N‘‘‘+a.publisher_db+‘‘‘, @publication = N‘‘‘+a.publication+‘‘‘, @subscriber = N‘‘‘+ c.name+‘‘‘, @subscriber_db = N‘‘‘+b.subscriber_db+‘‘‘, @subscription_type =‘+CAST(b.subscription_type AS VARCHAR) FROM dbo.MSreplication_monitordata a(NOLOCK) JOIN (select publication_id,subscriber_id,subscriber_db,subscription_type FROM MSsubscriptions (NOLOCK) GROUP BY publication_id,subscriber_id,subscriber_db,subscription_type) b ON a.publication_id = b.publication_id JOIN sys.servers c(NOLOCK) ON b.subscriber_id=c.server_id WHERE a.agent_type=1
重置自增ID:
DBCC CHECKIDENT (‘tablename‘, RESEED, 数值) ;
更新统计信息
update statistics tablename [ WITH [ FULLSCAN --完全扫描,很慢 | SAMPLE number { PERCENT | ROWS } --可以指定 抽样率 或 抽样行数 | RESAMPLE --使用最近的采样速率更新每个统计信息
本文出自 “桃花影落” 博客,请务必保留此出处http://jiaguijun.blog.51cto.com/401232/1416425
标签:sql server
原文地址:http://jiaguijun.blog.51cto.com/401232/1416425