I've created this simple SQL query which returns size of every list in your SP Content database in MB and the number of items of that list:
NOTE: This SQL query refers to SharePoint 2007 and 2010.
USE
[WSS_Content]
GO
SELECT
[dbo].[Lists].[tp_Title],
SUM([dbo].[Docs].[Size]/1024 + [dbo].[Docs].[MetaInfoSize]/1024)/1024 AS SizeMB,
COUNT(*) as NumberOfFiles
FROM
[WSS_Content].[dbo].[Docs]
INNER JOIN [WSS_Content].[dbo].[Webs] ON [dbo].[Webs].[Id] = [dbo].[Docs].[WebId]
INNER JOIN [WSS_Content].[dbo].[Lists] ON [dbo].[Lists].[tp_ID] = [dbo].[Docs].[ListId]
WHERE [dbo].[Docs].[Size] > 0
GROUP BY [dbo].[Lists].[tp_Title]
The results will look something like this:
That's what I'm looking for. Thanks!
ReplyDeleteThat's what I'm looking for. Thanks!
ReplyDeleteYou are welcome
Delete