Pages

Tuesday, October 16, 2012

How to create new site collection in new content DB in SharePoint


Option 1:

In this case from central administration, I am going to create a new content database and then change the Maximum Number of Sites value to equal Current Number of Sites for all the databases except the new one to make sure that the site is created in new database(temporarily).[I will post a different article for this soon and link it from here :- )][http://pitstopsharepoint.blogspot.com/2012/10/content-database-exclusively-for-one.html]

1. Create a new content database for the given web application (Central Administration -> Manage Content Databases)

2. Change the values for the Maximum Number of Sites value to equal Current Number of Sites (Central Administration -> Manage Content Databases)

3. Create the new site collection from the central admin (Central Administration -> Create Site Collection)

 
4. Revert back the changes (Central Administration -> Manage Content Databases)

Option 2:
In this case, we are creating a new content database first for the web application and then creating the site collection in that content database.

1. Add New Content Database to the Web Application

New-SPContentDatabase -Name <content_db_name> -WebApplication <web application URL>

2. Create New Site Collection in the New Content DB

New-SPSite <required site collection URL> -OwnerAlias <owner account name including domain name e.g.domain\username> -ContentDatabase <content_db_name> -Name <Name of your site collection> -Description <Description of site collection> -Template <template name,team sites template name is “STS#0″>

No comments:

Post a Comment