This PowerShell SharePoint tutorial explains, how to find content database name for site collection using PowerShell in SharePoint 2013/2016/2019.
We can easily know which content database one SharePoint site collection is using in SharePoint using PowerShell as well as from SharePoint central administration.
Find content database name for site collection using PowerShell in SharePoint
First, we will see how to find content database name for site collection from SharePoint 2013/2016 central administration.
Open SharePoint 2013/2016 central administration. Then click on Application Management.
Then under Site Collections, click on View all site collections.
In this page you can see the particular site collection and then in the right side you can see the content database name like below:
Using PowerShell also we can be able to know which content database one site collection is using in SharePoint 2013/2016.
You can execute the below PowerShell code in Windows PowerShell ISE.
Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue (Get-SPSite "http://mypc:29024/sites/HydTraining/").ContentDatabase.name
You may like following SharePoint content database tutorials:
- Backup and Restore content database SharePoint 2013
- Get Content DataBase Size Using PowerShell in SharePoint 2013
- Prevent new sites to be added to content databases in SharePoint 2013
- Get content database sizes for all web applications in a SharePoint farm using PowerShell
- Move Site Collections to other content databases in SharePoint 2013
- Content databases are growing too large in SharePoint 2013
This SharePoint tutorial, we discussed how to find content database name for site collection using PowerShell in SharePoint 2013/2016/2019.
Bhawana Rathore is a Microsoft MVP (3 times in Office Apps & Services) and a passionate SharePoint Consultant, having around 10 years of IT experience in the industry, as well as in .Net technologies. She likes to share her technical expertise in EnjoySharePoint.com and SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.