RSS

Tag Archives: Content Database

Choose Which Content Database to Create Your Site Collection in

Applies to: SharePoint

If you want to choose which Content Database to use when creating a new Site Collection you will have to use Powershell. There are some crazy solutions out there that tell you to do things like detach all other content databases or adjust the site limits to force SharePoint to pick your Content Database, but in a production environment that is usually not possible – not to mention stupid.

You can do all of this with the stsadm tool in SharePoint 2007, but I won’t be covering that here. But a good reference to figure out what commands match the powershell ones can be found here: http://technet.microsoft.com/en-us/library/ff621081.aspx

If you already have a Content Database you’d like to use, then skip ahead. Otherwise you can create a new Content Database pretty easy in Powershell using this command:

New-SPContentDatabase -Name MyNewSite_Content -WebApplication http://mysharepointsite.com

One of the main irritations with creating a new Site Collection from Powershell rather than the GUI is, although you gain the ability to specify the Content Database, you have to specify the site template by internal name. To get the internal names of all the Site Templates available, use this command:

Get-SPWebTemplate

But for the lazy (me), I’ve put a quick list of most of the templates and their internal names (For English sites – 1033) at the end of this article.

To create the new Site Collection while specifying the Content Database use the following command:

New-SPSite http://mysharepointsite.com/sites/mynewsite -OwnerAlias "MyDomain\MyUser" -ContentDatabase MyNewSite_Content -Name "My New Site!" -Template "STS#0"

That’s it! There’s a bunch of other parameters for the New-SPSite command you can specify (Like Description), but that’s the basic syntax.

Default Installed Templates and their internal Names:

Internal Name Title
GLOBAL#0 Global template
STS#0 Team Site
STS#1 Blank Site
STS#2 Document Workspace
MPS#0 Basic Meeting Workspace
MPS#1 Blank Meeting Workspace
MPS#2 Decision Meeting Workspace
MPS#3 Social Meeting Workspace
MPS#4 Multipage Meeting Workspace
CENTRALADMIN#0 Central Admin Site
WIKI#0 Wiki Site
BLOG#0 Blog
SGS#0 Group Work Site
TENANTADMIN#0 Tenant Admin Site
ACCSRV#0 Access Services Site
ACCSRV#1 Assets Web Database
ACCSRV#3 Charitable Contributions Web Database
ACCSRV#4 Contacts Web Database
ACCSRV#6 Issues Web Database
ACCSRV#5 Projects Web Database
BDR#0 Document Center
BT#0 Bug Database
OFFILE#0 (obsolete) Records Center
OFFILE#1 Records Center
OSRV#0 Shared Services Administration Site
PPSMASite#0 PerformancePoint
BICenterSite#0 Business Intelligence Center
SPS#0 SharePoint Portal Server Site
SPSPERS#0 SharePoint Portal Server Personal Space
SPSMSITE#0 Personalization Site
SPSTOC#0 Contents area Template
SPSTOPIC#0 Topic area template
SPSNEWS#0 News Site
CMSPUBLISHING#0 Publishing Site
BLANKINTERNET#0 Publishing Site
BLANKINTERNET#1 Press Releases Site
BLANKINTERNET#2 Publishing Site with Workflow
SPSNHOME#0 News Site
SPSSITES#0 Site Directory
SPSCOMMU#0 Community area template
SPSREPORTCENTER#0 Report Center
SPSPORTAL#0 Collaboration Portal
SRCHCEN#0 Enterprise Search Center
PROFILES#0 Profiles
BLANKINTERNETCONTAINER#0 Publishing Portal
SPSMSITEHOST#0 My Site Host
ENTERWIKI#0 Enterprise Wiki
SRCHCENTERLITE#0 Basic Search Center
SRCHCENTERLITE#1 Basic Search Center
SRCHCENTERFAST#0 FAST Search Center
visprus#0 Visio Process Repository
 
9 Comments

Posted by on February 23, 2012 in Powershell, SharePoint

 

Tags: , , , ,

 
Follow

Get every new post delivered to your Inbox.

Join 31 other followers