How to Remove Content Database in SharePoint using PowerShell?
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:
How to delete content database in central administration?
Login as a Farm Administrators and follow these steps to delete content database in central administration.
SharePoint 2013: Remove content database using PowerShell
To delete content database from SharePoint, use: Remove-SPContentDatabase cmdlet, which removes the content database from SharePoint web application and deletes it from the SQL Server also.
Related Posts:
How to delete content database in central administration?
Login as a Farm Administrators and follow these steps to delete content database in central administration.
- Go to SharePoint Central Administration >> Application Management >> Manage Content Databases in the Databases section
- Select the web Application from the drop down menu and click on the name of the content database.
- In the Manage Content Database Settings page, select "Remove content database" check box. Confirm the prompt and Click on OK to to delete content database in sharepoint.
SharePoint 2013: Remove content database using PowerShell
To delete content database from SharePoint, use: Remove-SPContentDatabase cmdlet, which removes the content database from SharePoint web application and deletes it from the SQL Server also.
Syntax: Get-SPContentDatabase -Identity "ContentDB-Name" | Remove-SPContentDatabase E.g. Get-SPContentDatabase -Identity "SP10_Intranet_Content02" | Remove-SPContentDatabaseThis 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!
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
appreciated, thank you
ReplyDelete