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:
- Open Central Administration.
- Go to "Application Management".
- Click on "View all site collections".
- Select the site collection you need to get the database name.
- 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> $site.ContentDatabase.name
So in this case "WSS_Content" is the Content Database Name which is being used by this site collection.