返回 登录
1

republication1

阅读751

select distinct sv.data_source,a.publisher_db,a.publication,b.article,a.publication_id
,sv1.data_source,s.subscriber_db
from MSsubscriptions as s
inner join [dbo].MSpublications a on s.publication_id=a.publication_id
inner join dbo.[MSarticles] b on a.publication_id=b.publication_id
left join sys.servers sv on a.publisher_id=sv.server_id
left join sys.servers sv1 on s.subscriber_id=sv1.server_id
where s.subscriber_db<>’virtual’
order by sv.data_source,publication,subscriber_db

select d.comments,b.name,a.* from [dbo].[MSdistribution_agents] a
left join sys.servers b on a.subscriber_id=b.server_id
outer apply (select top 1 *
from [dbo].[MSdistribution_history] c
where a.id=c.agent_id
order by time desc) d
where subscriber_db<>’virtual’
order by comments
select b.publisher_db,c.article,COUNT(*)
from MSrepl_commands a with(nolock)
left join MSpublisher_databases b with(nolock)
on a.publisher_database_id = b.id
left join MSarticles c with(nolock)
on a.article_id = c.article_id and b.publisher_db = c.publisher_db
group by b.publisher_db,c.article

评论