Site collection in a particular content database RRS feed

  • Question

  • How can we make sure to create a site collection in a particular content database?

    Arun Prakash

    Monday, June 3, 2013 7:03 AM


  • Hi Arun, 

    There is no direct option from SharePoint UI to select content database while creating Site collection, However you can do that using power shell .. here is the code..

    $url = "http://test/sites/Communities"
    $ContentDatabase = "OSCommunities_Content"
    $WebsiteName = "Communities"
    $WebsiteDesc = "Communities site"
    $Template = "STS#1"
    $PrimaryLogin = "domain\abg-spprodadmin"
    $PrimaryDisplay = "admin"
    $PrimaryEmail = ""
    New-SPSite -Url $url –ContentDatabase $ContentDatabase -Name $WebsiteName –Description $WebsiteDesc  -Template $Template -OwnerAlias $PrimaryLogin –OwnerEmail $PrimaryEmail

    Monday, June 3, 2013 7:15 AM
  • You can create the site collection in a specific database using PowerShell. See this link for a rather nice explanation:

    Monday, June 3, 2013 7:06 AM

All replies