Tuesday, May 12, 2015

SharePoint 2013 Tip: how get list of site collection URLs and their lengths

Use this SQL script below.  In SSMS, right-click on the database name the site collection resides in, choose New Query, and then just paste and execute the script.
SELECT CONCAT([DirName], N'/', [LeafName]) AS [FullRelativePath], LEN(CONCAT([DirName], N'/', [LeafName])) AS [Length] FROM [dbo].[AllDocs] ORDER BY [Length] DESC

No comments: