Monthly Archives: June 2012

PreUpgrade Check fun

Great article for fixing pre upgrade related issues:

One thing to add.  Use the query here to find the name of the pages that contain the offending webparts.  I thought deleting the page would make them go away, but I was wrong.  I had to recover the pages that I deleted from the recycle bin and then open them in web part maintenance view (appending “?contents=1” to the url and then delete the webparts from the page.

 Here’s the STSADM commands:

STSADM -o preupgradecheck

and this one to find the sites that the webparts live in:

stsadm -o enumallwebs -includewebparts > i:tempwebparts.txt

Better yet, use the SQL command above to get the actual page that the webpart lives in.


How to find a SharePoint webpart name from the ID or GUID?

SELECT DISTINCT D.SiteID, D.WebId, W.FullURL as WebURL, D.Id As DocumentId, 
                D.DirName, D.LeafName, tp_ID As WebPartSK 
FROM       dbo.Docs D WITH (nolock)  
INNER JOIN dbo.Webs W WITH (nolock) ON D.WebID = W.Id 
INNER JOIN dbo.WebParts WP WITH (nolock) ON D.Id = WP.tp_PageUrlID 
WHERE WP.tp_ListId Is Null AND WP.tp_Type Is Null AND WP.tp_Flags Is Null 
      AND WP.tp_BaseViewID Is Null AND WP.tp_DisplayName Is Null  
      AND WP.tp_Version Is Null 
AND WP.tp_WebPartTypeId='<your web parts id>’ 

Source for this query is Ryan’s comment her: