Saturday, 30 July 2011

How to find the user who has created a subsite using out of box functionality in MOSS 2007


Site administrators used to create various subsites under their sites as per their requirement.
Sometimes I have observed that site collection admins of or other admins want to know who has created a site.

This is not possible through the UI in out of the box methods except if the site is created by copying or moving other site via site manager.
There is a set of queries needs to be executed to get this information from database. Here are the steps to be followed:

1. Login to central administrator and go to Application Management --> Site collection list.
2. Select the web application hosting your site.
3. Select the site collection under which your subsite is located.
4. Note down the database name.
5. Login to your database server

Now execute the following query

using Your_database_name

Select tp_Login, tp_Title From UserInfo With(NoLOck)Where tp_ID = (Select Author From Webs With(NoLock)Where FullUrl='RelativeUrlOfYourSite') AND tp_SiteID = (Select SiteId From Webs With(NoLock)Where FullUrl='RelativeUrlOfYourSite')

This will provide you the Login and Title of the subsite creator.

Rahul Rashu