locked
Find all References of a Webpart on Pages RRS feed

  • Question

  • Hello

    We have developed a custom webpart and deployed this to our farm. Now we need to know where this webpart is referenced (not webs, Webpages). 

    On a website I found the way with digging direclty in the content database with this TSQL

    USE [contentDatabaseName]
    SELECT DirName,LeafName FROM dbo.AllDocs WHERE id IN
    (SELECT tp_PageUrlID FROM dbo.WebParts WHERE
    (tp_WebPartTypeID='dcdbbbd0-8dd6-1ecb-a3b2-12d30061d482')
    OR (tp_WebPartTypeID='d5101cfe-e315-c578-cd06-1966f283e3ed')
    OR (tp_WebPartTypeID='602e7431-ac3e-75b9-c8e0-57533bdab161')

    http://blog.uvm.edu/jgm/2010/08/25/preparing-the-sharepoint-2007wss3-database-for-upgrade/

    The problem I have is how to get the tp_WebPartTypeID when I only have the Feature/Solution GUID. 

    Is there somewhere the Content Database Schema Diagram of MOSS 2007 available?

    Thanx.

    Monday, March 14, 2011 3:28 PM

Answers

  • Hi Murratore,

    I'm not much of a SQL expert, so I'm not sure if this'll be much use for you but please take a look at this

    http://vspug.com/ethan/2007/09/16/inspecting-the-sharepoint-content-database/

    Please keep in mind the warning at the start of the blog though, updating the databases directly violates the licensing.

    Hope that helps.


    http://www.final-exodus.net
    • Marked as answer by Leoyi Sun Wednesday, March 23, 2011 7:52 AM
    Monday, March 14, 2011 4:36 PM
    Answerer
  • another way is to create a custom program which will loop through all pages in all sites recursively and check web parts occurience on the page. It will be much more reliable and standard way to do ti.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com

    Moderator Note: I have deleted the SP 2010 post (from someone else - not sadomovalex) which followed this post in the thread. SP 2010 information is completely off-topic in the pre-SP 2010 forums. Save your SP 2010 questions and answers for the SP 2010 forums.

    • Marked as answer by Leoyi Sun Wednesday, March 23, 2011 7:52 AM
    • Edited by Mike Walsh FIN Wednesday, March 23, 2011 9:44 AM Moderator Note added about SP 2010 information being off topic in these pre-2010 forums. Other Moderators please note.
    Tuesday, March 15, 2011 3:58 PM

All replies

  • Hi Murratore,

    I'm not much of a SQL expert, so I'm not sure if this'll be much use for you but please take a look at this

    http://vspug.com/ethan/2007/09/16/inspecting-the-sharepoint-content-database/

    Please keep in mind the warning at the start of the blog though, updating the databases directly violates the licensing.

    Hope that helps.


    http://www.final-exodus.net
    • Marked as answer by Leoyi Sun Wednesday, March 23, 2011 7:52 AM
    Monday, March 14, 2011 4:36 PM
    Answerer
  • I know this Blogpost. But there is nothing mentioned about Webparts.

    Tuesday, March 15, 2011 10:16 AM
  • If you have the webpart applied to a page, open the page in SharePoint Designer, select the webpart on the webpart page and you will see the webpartID on the left under "Tag Properties" tab. 
    Tuesday, March 15, 2011 3:27 PM
  • another way is to create a custom program which will loop through all pages in all sites recursively and check web parts occurience on the page. It will be much more reliable and standard way to do ti.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com

    Moderator Note: I have deleted the SP 2010 post (from someone else - not sadomovalex) which followed this post in the thread. SP 2010 information is completely off-topic in the pre-SP 2010 forums. Save your SP 2010 questions and answers for the SP 2010 forums.

    • Marked as answer by Leoyi Sun Wednesday, March 23, 2011 7:52 AM
    • Edited by Mike Walsh FIN Wednesday, March 23, 2011 9:44 AM Moderator Note added about SP 2010 information being off topic in these pre-2010 forums. Other Moderators please note.
    Tuesday, March 15, 2011 3:58 PM