The content database is probably important database in SharePoint Server 2013. The following cmdlet in PowerShell to manage content database.
Getting setup to use PowerShell to manage content databases
- Get-SPContentDatabase - get information about content database(s).
Example Get-SPContentDatabase -webapplication http://sitename
- New-SPContentDatabase - create a new content database in a web application.
Example : New-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication http://sitename
- Dismount-SPContentDatabase - detach a content database from a web application.
Example : Dismount-SPContentDatabase 12345678-90ab-cdef-1234-567890abcdef
- Mount-SPContentDatabase - attach a content database to a web application.
Example : Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication http://sitename
- Remove-SPContentDatabase - detach a content database from a web application and drop the database from the SQL Server instance; be careful with this one!
Example : Get-SPContentDatabase 12345678-90ab-cdef-1234-567890abcdef | Remove-SPContentDatabase
- Set-SPContentDatabase - set properties of a content database
Example : Get-SPContentDatabase http://contoso.com | Set-SPContentDatabase -MaxSiteCount 1
- Test-SPContentDatabase - test a content database against a web application to see if all of the customizations in the content database are in the web application.
Test-SPContentDatabase -name WSS_Content_DB -webapplication http://sitename