Sunday, December 19, 2010

Quick way to count site collections and web sites in Sharepoint

Often we need to check how many site collections (SPSites) and web sites (SPWeb) are created by content producers in living production system (e.g. when dealing with performance issues). For those cases if you don’t want to check it manually via Central Administration or Sharepoint site UI, you can just perform the following SQL queries on content database:

   1: select count(*) from dbo.Webs
   2: select count(*) from dbo.Sites

It will show you the number of created sites (table Webs) and site collections (table Sites). This little tip may help if you want to perform quick calculation of Sharepoint resources.

No comments:

Post a Comment