The relationship of SharePoint 2010/2013/2016 content databases to site collections

Source: Internet
Author: User

In all, the relationship between a content database and a site collection is:

There can be multiple site collections in a content database, but a site collection exists only in one content database.

So here's the problem.

Question 1: can I specify a content database when I create a site collection? Or can I create a site collection in the specified content database?

The answer is, of course you can. Specific tutorials can Bing create Site Collection in a specific Content Database

?

Question 2: If I know the name of the content database, how do I see how many site collections there are in this content database?

Well, you can execute the following command:
Get-spsite-limit all-contentdatabase contentdbname | Select URL, @{label= "Size"; Expression={$_.usage.storage}}

When executing, replace the red font part with your content database name.

?

3: I want to know the correspondence between all the content databases and site collections, what should I do?

Well, you can execute the following command:
Get-spcontentdatabase | %{write-output "-$ ($_. Name) "; foreach ($site in $_.sites) {write-output $site. URL}}

The red Arrow refers to the name of the content database, and the following is the site collection that is stored under that content database.

You can see the content database: wss_content_2018 There are two sites below.

Question 4: If I know the site collection or site URL, how do I know which content database it belongs to?

Well, in fact, problem 3 can solve your problem, but I am happy, so answer your sentence more, execute the following command:
$site = get-spsite "http://sp10-web:2018/sites/Blog"

$site. Contentdatabase.name

$site. Dispose ()

Replace the red font section with your own URL

If you have any questions about this article or would like to have a direct dialogue with me, you can add my QQ Group:331434257

The relationship of SharePoint 2010/2013/2016 content databases to site collections

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.