Monday, March 7, 2011

Find closed web parts all over your portal

For most users, it's very common to close, instead delete a web part from pages, especially the landing page of a site. As an administrator, you can go to each page and open web part maintenance page to check and removed closed ones.

However, how do we find out which site has the most and deal with them first if you have hundred of sites to manage? You can use a SQL query to geerate a list. (MIcrosoft said do not touch your database, so, this is just for your own reference and risk).

select ''+dirname+'/'+ leafname+'?contents=1'
from alldocs inner join webparts on
Alldocs.id=webparts.tp_pageurlid
where tp_isincluded=0

No comments: