查看分发数据库数据量sql2008


 


create table #t(name varchar(100),num int)
 
insert #t  select 'MStracer_tokens',  (select count(1) from dbo.[MStracer_tokens] with (nolock))
insert #t  select 'MSarticles',  (select count(1) from dbo.[MSarticles] with (nolock))
insert #t  select 'MStracer_history',  (select count(1) from dbo.[MStracer_history] with (nolock))
insert #t  select 'MSsync_states',  (select count(1) from dbo.[MSsync_states] with (nolock))
insert #t  select 'MSsubscriptions',  (select count(1) from dbo.[MSsubscriptions] with (nolock))
insert #t  select 'MSmerge_articleresolver',  (select count(1) from dbo.[MSmerge_articleresolver] with (nolock))
insert #t  select 'MSmerge_subscriptions',  (select count(1) from dbo.[MSmerge_subscriptions] with (nolock))
insert #t  select 'MSrepl_transactions',  (select count(1) from dbo.[MSrepl_transactions] with (nolock))
insert #t  select 'MSrepl_commands',  (select count(1) from dbo.[MSrepl_commands] with (nolock))
insert #t  select 'MSrepl_originators',  (select count(1) from dbo.[MSrepl_originators] with (nolock))
insert #t  select 'MSreplication_monitordata',  (select count(1) from dbo.[MSreplication_monitordata] with (nolock))
insert #t  select 'MSsubscriber_info',  (select count(1) from dbo.[MSsubscriber_info] with (nolock))
insert #t  select 'MSsubscriber_schedule',  (select count(1) from dbo.[MSsubscriber_schedule] with (nolock))
insert #t  select 'MSsnapshot_history',  (select count(1) from dbo.[MSsnapshot_history] with (nolock))
insert #t  select 'MSlogreader_history',  (select count(1) from dbo.[MSlogreader_history] with (nolock))
insert #t  select 'MSdistribution_history',  (select count(1) from dbo.[MSdistribution_history] with (nolock))
insert #t  select 'MSmerge_sessions',  (select count(1) from dbo.[MSmerge_sessions] with (nolock))
insert #t  select 'MSmerge_articlehistory',  (select count(1) from dbo.[MSmerge_articlehistory] with (nolock))
insert #t  select 'MSrepl_errors',  (select count(1) from dbo.[MSrepl_errors] with (nolock))
insert #t  select 'MSmerge_history',  (select count(1) from dbo.[MSmerge_history] with (nolock))
insert #t  select 'MSmerge_identity_range_allocations',  (select count(1) from dbo.[MSmerge_identity_range_allocations] with (nolock))
insert #t  select 'MSsnapshot_agents',  (select count(1) from dbo.[MSsnapshot_agents] with (nolock))
insert #t  select 'MSlogreader_agents',  (select count(1) from dbo.[MSlogreader_agents] with (nolock))
insert #t  select 'MSdistribution_agents',  (select count(1) from dbo.[MSdistribution_agents] with (nolock))
insert #t  select 'MSmerge_agents',  (select count(1) from dbo.[MSmerge_agents] with (nolock))
insert #t  select 'MSrepl_identity_range',  (select count(1) from dbo.[MSrepl_identity_range] with (nolock))
insert #t  select 'MSpublication_access',  (select count(1) from dbo.[MSpublication_access] with (nolock))
insert #t  select 'MSqreader_agents',  (select count(1) from dbo.[MSqreader_agents] with (nolock))
insert #t  select 'MSqreader_history',  (select count(1) from dbo.[MSqreader_history] with (nolock))
insert #t  select 'MSrepl_backup_lsns',  (select count(1) from dbo.[MSrepl_backup_lsns] with (nolock))
insert #t  select 'MSpublicationthresholds',  (select count(1) from dbo.[MSpublicationthresholds] with (nolock))
insert #t  select 'IHpublishers',  (select count(1) from dbo.[IHpublishers] with (nolock))
insert #t  select 'IHpublishertables',  (select count(1) from dbo.[IHpublishertables] with (nolock))
insert #t  select 'IHarticles',  (select count(1) from dbo.[IHarticles] with (nolock))
insert #t  select 'IHpublishercolumns',  (select count(1) from dbo.[IHpublishercolumns] with (nolock))
insert #t  select 'IHcolumns',  (select count(1) from dbo.[IHcolumns] with (nolock))
insert #t  select 'IHindextypes',  (select count(1) from dbo.[IHindextypes] with (nolock))
insert #t  select 'IHpublisherindexes',  (select count(1) from dbo.[IHpublisherindexes] with (nolock))
insert #t  select 'IHpublishercolumnindexes',  (select count(1) from dbo.[IHpublishercolumnindexes] with (nolock))
insert #t  select 'IHpublications',  (select count(1) from dbo.[IHpublications] with (nolock))
insert #t  select 'IHconstrainttypes',  (select count(1) from dbo.[IHconstrainttypes] with (nolock))
insert #t  select 'IHpublisherconstraints',  (select count(1) from dbo.[IHpublisherconstraints] with (nolock))
insert #t  select 'IHpublishercolumnconstraints',  (select count(1) from dbo.[IHpublishercolumnconstraints] with (nolock))
insert #t  select 'IHsubscriptions',  (select count(1) from dbo.[IHsubscriptions] with (nolock))
insert #t  select 'sysschemaarticles',  (select count(1) from dbo.[sysschemaarticles] with (nolock))
insert #t  select 'MScached_peer_lsns',  (select count(1) from dbo.[MScached_peer_lsns] with (nolock))
insert #t  select 'MSrepl_version',  (select count(1) from dbo.[MSrepl_version] with (nolock))
insert #t  select 'MSpublisher_databases',  (select count(1) from dbo.[MSpublisher_databases] with (nolock))
insert #t  select 'MSpublications',  (select count(1) from dbo.[MSpublications] with (nolock))


select * from #t order by num desc
drop table #t

 【一淘专享价】Lenovo/联想 B460A-ITH(L) 扬天B460 I3 电脑 包邮

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值