Skip to main content

Changing the boundaries

Site Collections by default are stored in the content database for the web application. The diagram below illustrates this.



Using the administration user interface you cannot create a new site collection with its own content database. This may lead you to create many web applications for your SharePoint site collections so that each one has its own database that can be backed up using SQL Server database backups and SharePoint backup and restore.

Restoring the backups may become awkward as you will have to restore the whole content database unless you have a 3rd party disaster recovery tool in place.

STSADM has an operation called "CreateSiteInNewDB". The command line definition for this command is:

stsadm -o createsiteinnewdb -url -owneremail [-ownerlogin ] [-ownername ] [-secondaryemail ] [-secondarylogin ] [-secondaryname ] [-lcid ] [-sitetemplate ] [-title ] [-description ] [-hostheaderwebapplicationurl ] [-quota ] [-databaseuser ] [-databasepassword ] [-databaseserver ] [-databasename ]

for example:

stsadm -o createsiteinnewdb -url http://intranet/sites/HR -ownerlogin domain\spadmin -owneremail spadmin@company.com -sitetemplate SPSPORTAL#0 -title "HR" -databasename SharePoint_Content_HR

The diagram below illustrates the content boundaries when create site collections using stsadm -o createsiteinnewdb.



Of course there are considerations when deciding on which approach to choose. When you have site collection webpart like the Content Query WebPart are limited to aggregating content within the current site collection. The diagram below illustrates this.



If you decide to implement divisions of the company or site applications using site collections you just need to be aware of this, as its not alway fully understood. One workaround is that the MOSS search picks up all data stored in the site collections because of the way the content source is defined.

Comments

Popular posts from this blog

How to get SPUser or SPGroup from Person or Group field

You have person or group field in SharePoint list and you want to programmatically get the user or person. The below code to gets SPUser from User or Group field in the list when multiple choice and Groups are not allowed in the field: //get SPUser SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users"); SPFieldUserValue userFieldValue = (SPFieldUserValue)userField.GetFieldValue(item["Users"].ToString()); SPUser user = userFieldValue.User; This part of code would help you to get SPUser when multiple choice is allowed and groups are not allowed: //Multiple choices are allowed SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users"); SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString()); foreach (SPFieldUserValue userFieldValue in userFieldValueCollection) {     Console.WriteLine("     " + userFieldValue.User.LoginName); } And when group

SharePoint publishing page scheduling

In SharePoint 2010 publishing enabled team site collection is not showing schedule button in publish ribbon. Solution: Here is how to enable it  though the UI: Locate the SharePoint Server Web site on which you want to enable content approval and item scheduling. Click  Site Actions , click  Site Settings , and then click  Modify Pages Library Settings . Under  General Settings , click  Versioning Settings . Click  Yes  next to  Content Approval , and then click  OK . Click  Manage item scheduling .   Click to enable the  Enable scheduling of items in this list  check box, and then click  OK .

Changing Content Type Hub URL

Change the Hub URL through powershell by using: Set-SPMetadataServiceApplication -Identity " " -HubURI " " For Ex: Set-SPMetadataServiceApplication -Identity "Managed Metadata Service" -HubURI "http://contenttype.Domain.Com" When you try to do this you get this rather scary message: This is SharePoint telling you that this is a major thing so be careful! Essentially all your content types that you have published out will be removed if they can, and you have to republish all of your content types out again which can cause some issue.