Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see all site collections in a specific content DB

How can I see all site collections associated in a specific Content db in SharePoint 2010?

Any advice or suggestion is highly appreciated.

like image 663
SPAdmin Avatar asked Dec 22 '11 21:12

SPAdmin


People also ask

How many site collections can a content DB support?

However, up to 10,000 site collections in a database are supported. Note that in a content database with up to 10,000 total site collections, a maximum of 2,500 of these can be non-personal site collections.

How do I view all collections in SharePoint?

Open Central Administration. On the Application Management page, in the Site Collections section, click View all site collections. The Site Collection List page lists all the site collections in the web application. To display more information about a site collection, in the URL column, click the site collection.

Which command do you use to view all SharePoint site collections with PowerShell?

Use the Get-SPOSite PowerShell cmdlet to list all site collections in the tenant. Here is the PowerShell to list all SharePoint Online sites. This PowerShell enumerates site collections in SharePoint Online and gets the URL for each site.

Can a site collection exist in multiple databases?

A site collection can exist in only one content database, but one content database can host the content for multiple site collections. A site can't exist outside of a site collection and can only exist in one site collection but a site collection can host many sites.


2 Answers

Get-SPSite -Limit All  -ContentDatabase contentdbname | select url, @{label="Size";Expression={$_.usage.storage}} 
like image 57
SPAdmin Avatar answered Oct 14 '22 16:10

SPAdmin


This can also be achieved by

get-spsite -limit all | select url,contentdatabase

The output gets you all of your content databases and the site collections contained within. The -limit all would help if you have more than 100 site collections.

like image 44
Roger Waters Avatar answered Oct 14 '22 16:10

Roger Waters