how to check in what all site collections one web part is being use din moss 2007 RRS feed

  • Question

  • Hello,

    I need to get an info about one web part in which site collections being used in MOSS 2007. is there any way or tool which can help me out to get the info where all the webpart being used in MOSS 2007 site collections.

    PLease suggest some ideas.




    Wednesday, August 29, 2012 1:06 PM

All replies

  • Hi,

    Each web part added to a page is stored in the page itself. There's no central store that records where each web part is used. You need to iterate through every web part page in the site to retrieve this information. On each page you should then check the assembly names of the web parts programmatically.

    Or you can list all web parts in a site collection using Powershell, you also firstly loop through all pages in the site, then find all web parts in a page:http://www.glynblogs.com/2011/07/listing-all-web-parts-in-a-site-collection-with-powershell.html

    Xue-Mei Change
    TechNet Subscriber Support in forum
    If you have any feedback on our support, please contacttnmff@microsoft.com.

    Xue-mei Chang

    TechNet Community Support

    Thursday, August 30, 2012 5:40 AM
  • Chang,

    but this script is not working in MOSS 2007.how can it work there.


    Thursday, August 30, 2012 8:06 AM
  • You can do it by using the SQL query below;

    NOTE: You want to run the query on none-production farm or make sure you have backup of your DB (Hope you are familiar with Microsoft-sharepoint supportability on querying the DB)



    select u.tp_Login as [User Alias], tp_DisplayName as [View Name], d.DirName + '/' + d.LeafName as [URL], w.tp_ZoneID

    from AllDocs d with(nolock)

    join WebParts w

    on w.tp_PageUrlID = d.Id

    left outer join UserInfo u

    on w.tp_UserID = u.tp_ID

    where w.tp_WebPartTypeId = '2A441B55-42A8-7EE8-A573-12530DBD02A8'

    order by [User Alias] DESC

    Replace the WEbPartTypeId with the guid of the web part you are working on. Another advantage of the query above, it will return web parts added on personal views too (admins cannot see web part on personal view through GUI)

    Let me know how that goes!

    • Proposed as answer by mykirii Sunday, September 2, 2012 2:38 PM
    • Unproposed as answer by Hemendra AgrawalModerator Monday, December 31, 2012 9:36 AM
    • Proposed as answer by MangiMkuu Friday, October 11, 2013 3:33 AM
    Friday, August 31, 2012 12:41 AM