Friday, February 26, 2016

PowerShell to know the SQL Server DB Name for a site collection

SQL Server DB Name for a specific SharePoint site collection

If you are having the central admin access of SharePoint, then follow the below steps to know the Database name of a particular site collection

Follow these steps:
  1. Open Central Administration.
  2. Go to "Application Management".
  3. Click on "View all site collections".
  4. Select the site collection you need to get the database name.
  5. In the panel on the right you should see "Database Name", that's the name of the content database.

If you are not having central admin access, you can use the PowerShell to know the same.  Open SharePoint 2010 Management Shell.

PS C:\Users\<username> $url="http://<host-name>/sites/<site collection name>"
PS C:\Users\<username> $site = Get-SPSite $url
PS C:\Users\<username> $

So in this case "WSS_Content" is the Content Database Name which is  being used by this site collection.

1 comment:

  1. Useful share and you wrote it very nicely here. The clarity for your writing is simply polite and i could expect you're a specialist on this subject area. Well together with your authorization permit me to grab your feed to stay upgraded with up and coming post. You can take this munnar taxi service for any tours and travels program of your family. They are providing secured and comfortable cabs.