in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

benc's blog

SharePoint SQL: Find all lists with event sinks

As promised, here is the first in a series of queries against SharePoint's (either WSS or SPS) content database. This particular query returns all document libraries for all sites in the current content database that have event sinks attached. Quite useful for keeping track of things in environments that use event sinks extensively.

Note that it would be fairly straightforward to implement this in the object model. But it wouldn't be as quick and simple as this query:

  SELECT      Webs.FullUrl,      Lists.tp_Title,      Lists.tp_EventSinkAssembly,      Lists.tp_EventSinkClass,      Lists.tp_EventSinkData  FROM      Lists,      Webs  WHERE      Webs.Id = Lists.tp_WebId      AND Lists.tp_EventSinkAssembly IS NOT NULL  ORDER BY      Webs.FullUrl,      Lists.tp_Title  

Comments

No Comments

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts