select
sum(LEN(text)),
sysobjects.name,
COUNT(*)
from
sysobjects inner join syscomments
on
sysobjects.id = syscomments.id
where xtype = 'P'
and syscomments.encrypted = 0
group by
sysobjects.name
order by
sum(LEN(text))
统计sql proc内容的长度。加密的不能统计,另