如何確定SharePoint的文檔庫列表的大小


方法一: SharePoint Designer

====================

1. 在SharePoint Designer中打開站點.

2. 右鍵單擊你想要查看的文檔庫的tree node, 選擇properties.

docsize1

 

方法二: Object Model

==================

SPSite對象的StorageManagementInformation方法可以被用來讀取整個站點集上的列表, 文檔庫的尺寸信息.

using (SPSite site = new SPSite("http://servername"))
{ 
    DataTable tbl; 
    tbl = site.StorageManagementInformation(
        SPSite.StorageManagementInformationType.DocumentLibrary, 
        SPSite.StorageManagementSortOrder.Decreasing, 
        SPSite.StorageManagementSortedOn.Size, 100); 
    foreach (DataRow row in tbl.Rows) 
    {
        foreach (DataColumn column in tbl.Columns)          
            MessageBox.Show("Doc Lib Name :" + row["Title"].ToString() + "  Size (bytes): " + row["Size"].ToString()); 
    } 
}

 

方法三: 用存儲過程在數據庫中直接撈取

==================

使用這個存儲過程, 可以得到按字節的, 站點集中的包括metadata的信息在內的所有文檔庫的大小.

PROCEDURE proc_GetDocLibrarySizes (
@SiteId uniqueidentifier
);

 

[MS-WSSCADM]: Windows SharePoint Services Content Database Administrative Communications Protocol Specification

http://msdn.microsoft.com/en-us/library/cc313099.aspx

SharePoint Document library size

http://sridharu.blogspot.com/2009/02/sharepoint-document-library-size.html


注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
粤ICP备14056181号  © 2014-2021 ITdaan.com