Tuesday, July 8, 2008

How to rename a WSS site

This is the link which i found..interesting...

http://cosier.wordpress.com/2005/12/9/how-to-rename-a-wss-site/

Different Databases Created with MOSS

Though we don’t need to know the DB structure for MOSS Applications but I just thought to put something on the DB’s created when we configure a Share Point Farm.

These are the two database which got created when we run the SharePoint Products and Technologies Configuration Wizard (The databases are not automatically created when we install the product. The installation just install the binaries.) These are the master databases which stores all the config information for the farm.

· The configuration database (SharePoint_config by default)
· The Admin content database (SharePoint_AdminContent_GUID).

Every Web App has its own Content DB. All site collections which are there in same web app goes into this same content DB.

Database created for an SSP: When we are creating any SSP within a new web app (which is a recommended practice) a new content DB is getting created for the Web App. If we host the ‘My Site’ feature into a new web app, again a new Content DB is created for My Sites. Two more DB’s are created for each SSP. One DB stores the data for the services provided by the SSP and another DB stores the search related data for quicker search performance.

Some Important Tables with SharePoint 2007

------------------------------------------------------------------

Here is the list of some important tables in SharePoint Content DB:

* Sites: This Table holds information about all the site collections for this content database.
* Webs: This Table holds information about all the specific sites (webs) in each site collection.
* UserInfo: This Table holds information about all the users for each site collection.
* Groups: This Table holds information about all the SharePoint groups in each site collection.
* Roles: This Table holds information about all the SharePoint roles (permission levels) for each site.
* AllLists: This Table holds information about lists for each site.
* GroupMembership: This Table holds information about all the SharePoint group members.
* AllUserData: This Table holds information about all the list items for each list.
* AllDocs: This Table holds information about all the documents (and all list items) for each document library

and list.
* AllUserData: This table has all the metadata which user provides in a document library.
* RoleAssignment: This Table holds information about all the users or SharePoint groups that are assigned to

roles.
* SchedSubscriptions: This Table holds information about all the scheduled subscriptions (alerts) for each user.
* ImmedSubscriptions: This Table holds information about all the immediate subscriptions (alerts) for each user.

Some queries with these tables:

-- Query to get all the top level site collections

SELECT SiteId AS Siteid, Id AS Webid, FullUrl AS FURL, Title, Author, TimeCreated FROM dbo.Webs WHERE

(ParentWebId IS NULL)

-- Query to get all the child sites in a site collection

SELECT SiteId AS Siteid, Id AS Webid, FullUrl AS FURl, Title, Author, TimeCreated FROM dbo.Webs WHERE

(NOT (ParentWebId IS NULL))

-- Query to get all the SharePoint groups in a site collection

SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.Groups.ID AS Expr1,

dbo.Groups.Title AS Expr2, dbo.Groups.Description FROM dbo.Groups INNER JOIN dbo.Webs ON

dbo.Groups.SiteId = dbo.Webs.SiteId

-- Query to get all the users in a site collection

SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.UserInfo.tp_ID,

dbo.UserInfo.tp_DomainGroup, dbo.UserInfo.tp_SiteAdmin, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Email FROM

dbo.UserInfo INNER JOIN dbo.Webs ON dbo.UserInfo.tp_SiteID = dbo.Webs.SiteId

-- Query to get all the members of the SharePoint Groups

SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login FROM

dbo.GroupMembership INNER JOIN dbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER

JOINdbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID

-- Query to get all the sites where a specific feature is activated

SELECT dbo.Webs.Id AS WebGuid, dbo.Webs.Title AS WebTitle, dbo.Webs.FullUrl AS WebUrl,

dbo.Features.FeatureId, dbo.Features.TimeActivatedFROM dbo.Features INNER JOIN dbo.Webs ON

dbo.Features.SiteId = dbo.Webs.SiteId AND dbo.Features.WebId = dbo.Webs.Id WHERE

(dbo.Features.FeatureId = '00AFDA71-D2CE-42fg-9C63-A44004CE0104')

-- Query to get all the users assigned to roles

SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle,

dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login FROM dbo.RoleAssignment INNER JOIN dbo.Roles ON

dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN

dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN

dbo.UserInfo ON dbo.RoleAssignment.PrincipalId = dbo.UserInfo.tp_ID

-- Query to get all the SharePoint groups assigned to roles

SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle,

dbo.Groups.Title AS GroupName FROM dbo.RoleAssignment INNER JOINdbo.Roles ON

dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN

dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN

dbo.Groups ON dbo.RoleAssignment.SiteId = dbo.Groups.SiteId AND dbo.RoleAssignment.PrincipalId =

dbo.Groups.ID