SharePoint content databases are the most important artifacts in SharePoint platform as they hold majority of the data. However, at times we may have to delete the content database from SharePoint. Here is how you can utilize PowerShell to delete database:
SharePoint 2010: Remove content database using PowerShell
To delete content databasefrom SharePoint, use: Remove-SPContentDatabase cmdlet, which removes the content database from SharePoint web application and deletes it from the SQL Server also.
Related Posts:
SharePoint 2010: Remove content database using PowerShell
To delete content databasefrom SharePoint, use: Remove-SPContentDatabase cmdlet, which removes the content database from SharePoint web application and deletes it from the SQL Server also.
Syntax:This deletes SharePoint Content database from SharePoint as well as from SQL Server permanently! As stated, use: Dismount-SPContentDatabase cmdlet if you want to remove the database from SharePoint alone!
Get-SPContentDatabase -Identity "ContentDB-Name" | Remove-SPContentDatabase
E.g.
Get-SPContentDatabase -Identity "SP10_Intranet_Content02" | Remove-SPContentDatabase
Related Posts:
- To add content database in SharePoint using PowerShell, Refer: How to Create a New Content Database in SharePoint 2013 using PowerShell
- How to Find and remove unused content databases in SharePoint: Find and Delete Unused Orphan Databases in SharePoint