如何确定 SharePoint 列表的磁盘大小?

发布于 2024-07-23 11:22:11 字数 77 浏览 12 评论 0原文

我有一个包含大约 5500 个项目的列表,我想了解磁盘上的大小。 我有什么办法可以做到这一点吗? 如有必要,我不介意在数据库中运行查询。

I have a list with roughly 5500 items, and I would like to find out the size on disk. Is there some way I can do this? I don't mind running a query in the database, if necessary.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

娇纵 2024-07-30 11:22:12

站点设置-> 存储指标

您可以查看每个对象的消耗量,单击列表即可查看每个单独的列表

您不必设置站点配额

Sharepoint 2013

网站设置

Site Settings -> Storage Metrics

You can see how much each object is consuming, click on Lists to see each individual list

You don't have to set a site quota

Sharepoint 2013

Site settings

薄荷港 2024-07-30 11:22:12

这取自 SharePoint 2013:

USE [WSS_Content_Intranet]
GO

SELECT 
    (ISNULL(DocSizes,0) + ISNULL(UserDataSize,0)) As TotalSize, 
    nLists.tp_ID,
    nLists.tp_Title,
    nLists.tp_ItemCount,
    Webs.FullUrl
FROM
    Webs
INNER JOIN
    (
    SELECT 
        ALAux.ItemCount as tp_ItemCount, 
        Lists.tp_Title, 
        Lists.tp_ID, 
        Lists.tp_WebID, 
        ALAux.Modified as tp_Modified, 
        Lists.tp_ServerTemplate, 
        Docs.DirName, 
        Docs.LeafName, 
        Lists.tp_ImageUrl
    FROM 
        Lists
    CROSS APPLY
        TVF_AllListsAux_NoLock_ListId(Lists.tp_SiteId, Lists.tp_ID) AS ALAux
    INNER JOIN 
        Docs
    ON 
        Lists.tp_RootFolder = Docs.Id AND 
        Lists.tp_WebId = Docs.WebId 
    WHERE 
        tp_BaseType <> 1 AND
        Lists.tp_SiteId = YOUR_SITE_ID
    ) As nLists
    ON
        Webs.Id = nLists.tp_WebId
    LEFT OUTER JOIN
        (
        SELECT 
            (SUM(CAST((ISNULL(Docs.Size,0)) AS BIGINT))) As DocSizes, 
            Docs.ListId,
            Docs.SiteId
        FROM 
            Docs 
        WHERE
            Docs.Type = 0 AND SiteId = YOUR_SITE_ID
        GROUP BY
            Docs.ListId,Docs.SiteId
        ) As DocsInList
        ON
            DocsInList.ListId = nLists.tp_ID
        LEFT OUTER JOIN
            (
            SELECT 
                (SUM(CAST((ISNULL(tp_Size,0)) AS BIGINT))) As UserDataSize, 
                tp_ListId 
            FROM
                UserData 
            GROUP BY 
                UserData.tp_ListId
            ) AS UserDataInList
            ON
                UserDataInList.tp_ListId = DocsInList.ListId
ORDER BY TotalSize DESC

它返回所有网站的所有列表,对项目和附加文档的大小进行求和。 不包括文档库,请使用:

SELECT
    Lists.tp_Title,
    Lists.tp_ID as Id,
    SUM(Docs.Size/1024 + Docs.MetaInfoSize/1024)/1024 AS SizeMB,
    COUNT(*) as NumberOfFiles
FROM dbo.Docs
    INNER JOIN Webs ON Webs.Id = Docs.WebId
    INNER JOIN Lists ON Lists.tp_ID = Docs.ListId
WHERE Docs.Size > 0
GROUP BY Lists.tp_Title,Lists.tp_ID

This is taken from SharePoint 2013:

USE [WSS_Content_Intranet]
GO

SELECT 
    (ISNULL(DocSizes,0) + ISNULL(UserDataSize,0)) As TotalSize, 
    nLists.tp_ID,
    nLists.tp_Title,
    nLists.tp_ItemCount,
    Webs.FullUrl
FROM
    Webs
INNER JOIN
    (
    SELECT 
        ALAux.ItemCount as tp_ItemCount, 
        Lists.tp_Title, 
        Lists.tp_ID, 
        Lists.tp_WebID, 
        ALAux.Modified as tp_Modified, 
        Lists.tp_ServerTemplate, 
        Docs.DirName, 
        Docs.LeafName, 
        Lists.tp_ImageUrl
    FROM 
        Lists
    CROSS APPLY
        TVF_AllListsAux_NoLock_ListId(Lists.tp_SiteId, Lists.tp_ID) AS ALAux
    INNER JOIN 
        Docs
    ON 
        Lists.tp_RootFolder = Docs.Id AND 
        Lists.tp_WebId = Docs.WebId 
    WHERE 
        tp_BaseType <> 1 AND
        Lists.tp_SiteId = YOUR_SITE_ID
    ) As nLists
    ON
        Webs.Id = nLists.tp_WebId
    LEFT OUTER JOIN
        (
        SELECT 
            (SUM(CAST((ISNULL(Docs.Size,0)) AS BIGINT))) As DocSizes, 
            Docs.ListId,
            Docs.SiteId
        FROM 
            Docs 
        WHERE
            Docs.Type = 0 AND SiteId = YOUR_SITE_ID
        GROUP BY
            Docs.ListId,Docs.SiteId
        ) As DocsInList
        ON
            DocsInList.ListId = nLists.tp_ID
        LEFT OUTER JOIN
            (
            SELECT 
                (SUM(CAST((ISNULL(tp_Size,0)) AS BIGINT))) As UserDataSize, 
                tp_ListId 
            FROM
                UserData 
            GROUP BY 
                UserData.tp_ListId
            ) AS UserDataInList
            ON
                UserDataInList.tp_ListId = DocsInList.ListId
ORDER BY TotalSize DESC

It returns all lists of all webs, summing the size of the items and the attached documents. Document libraries are not included, use this:

SELECT
    Lists.tp_Title,
    Lists.tp_ID as Id,
    SUM(Docs.Size/1024 + Docs.MetaInfoSize/1024)/1024 AS SizeMB,
    COUNT(*) as NumberOfFiles
FROM dbo.Docs
    INNER JOIN Webs ON Webs.Id = Docs.WebId
    INNER JOIN Lists ON Lists.tp_ID = Docs.ListId
WHERE Docs.Size > 0
GROUP BY Lists.tp_Title,Lists.tp_ID
疧_╮線 2024-07-30 11:22:12

正如侯赛因·纳赛尔在该帖子中所说。 这仍然与 SharePoint 2016 和 Sharepoint 2019 相关(本地检查)

作为网站集管理员,我转到网站设置 -> 存储指标和宾果...

如果您有多个列表,则单击“列表”超链接,它将为您提供每个列表的详细信息。

As Hussein Nasser said in this thread. This still relevant for SharePoint 2016 and Sharepoint 2019 (on-premise checked)

Being site collection admin, I went to Site Settings -> Storage Metrics and bingo...

If you have multiple lists, then click on Lists hyperlink, it will give you details info for each list.

How it looks

你的背包 2024-07-30 11:22:11

导航到 http://[myapplication]/[mySitecollection]/_layouts/storman.aspx

这将列出网站集的存储空间分配。

Navigate to http://[myapplication]/[mySitecollection]/_layouts/storman.aspx

This will list the Storage Space Allocation for the site collection.

亚希 2024-07-30 11:22:11

如果您启用站点配额,站点设置下会出现一个名为存储空间分配的选项。 当您在管理中心设置配额时,页面会告诉您当前使用的存储空间是多少,以便您可以在此之前有所了解。 进入存储空间分配报告后,您可以看到库的总大小。

遗憾的是,如果不启用网站配额,您将无法获取此报告。

If you enable a site quota, an option under site settings appears called Storage Space Allocation. When you go to set a quota in the Central Administration, the page will tell you what the current storage used is so you can have an idea before there. Once you get to the Storage Space Allocation report, you can see the total size of a library.

Unfortunately, you can't get this report without turning on a site quota.

玩世 2024-07-30 11:22:11

我无法让蒂姆·多布林斯基的建议发挥作用。 这个 T-SQL 查询并没有处理所有问题,但给出了一个非常好的想法。 将其弹出到 Excel 中,然后添加“大小(以 MB 为单位)”列并添加公式。

USE [WSS_Content]
GO

SELECT
       [dbo].[Webs].[FullUrl]
      ,[dbo].[Lists].[tp_Title] AS "ListName"
      ,[dbo].[Docs].[DirName]
      ,[dbo].[Docs].[LeafName]
      ,[dbo].[Docs].[Size]
      ,[dbo].[Docs].[MetaInfoSize]
      ,[dbo].[Docs].[Version]
      ,[dbo].[Docs].[TimeCreated]
      ,[dbo].[Docs].[TimeLastModified]
      ,[dbo].[Docs].[MetaInfoTimeLastModified]
      ,[dbo].[Docs].[CheckoutUserId]
      ,[dbo].[Docs].[CheckoutDate]
      ,[dbo].[Docs].[ExtensionForFile]

  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     
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.stp')   
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.aspx')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.xfp')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.dwp')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%template%')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.inf')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.css')

I could not get Tim Dobrinski's suggestion to work. This T-SQL query does not deal with everything, but gives a very good idea. Pop it into Excel, then add a column for "Size in MB" and add in a formula.

USE [WSS_Content]
GO

SELECT
       [dbo].[Webs].[FullUrl]
      ,[dbo].[Lists].[tp_Title] AS "ListName"
      ,[dbo].[Docs].[DirName]
      ,[dbo].[Docs].[LeafName]
      ,[dbo].[Docs].[Size]
      ,[dbo].[Docs].[MetaInfoSize]
      ,[dbo].[Docs].[Version]
      ,[dbo].[Docs].[TimeCreated]
      ,[dbo].[Docs].[TimeLastModified]
      ,[dbo].[Docs].[MetaInfoTimeLastModified]
      ,[dbo].[Docs].[CheckoutUserId]
      ,[dbo].[Docs].[CheckoutDate]
      ,[dbo].[Docs].[ExtensionForFile]

  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     
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.stp')   
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.aspx')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.xfp')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.dwp')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%template%')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.inf')
  AND ([dbo].[Docs].[LeafName] NOT LIKE '%.css')
万人眼中万个我 2024-07-30 11:22:11

如果您将相关列表作为模板保存到文件系统中,这应该能让您大致了解其大小。 如果您需要定期执行此操作,则此方法不太有用。

If you save the list in question as a template to the file system, this should give you a rough idea of its size. If you need to do this on a periodic basis this approach is not as useful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文