Sunday, January 4, 2009

Discovering all workflows in shareoint farm.

I got a question from user to identify all workflow in my Sharepoint environment. I tried to identify some out of box option but could not find one. After that I have to put my DB cap on and write query on backend content database of MOSS farm to get list all sites and sub containers which are having active workflow running in them. Here is the query :

select distinct(w.fullurl) as SiteName, L.tp_Title as ListName from webs w,workflow wf , Alllists L where w.id=wf.webid and w.siteId=wf.siteId and wf.listId=L.tp_Id

Another query to get list of all sites and subsites and there approximate data size in sharepoint farm through content database is.

select w.fullurl as URL,d.webId as WebID,sum(d.size/1024) as Size
from docs as d ,webs as w
where d.webId=w.Id
group by d.webId ,w.fullurl
order by w.fullurl

No comments: