Remove SharePoint Content Database From SQL Server Management Studio

There can be instances, where an orphaned SharePoint content database has to be removed. It can be a faulty database, which was created during migration, or an un-mounted database, which is no longer used by the Web Application. We will see how to delete directly from SQL Server Management Studio.

When we right click and delete the database, it will open up the ‘Delete Object’ page. Clicking on 'OK' should ideally delete the database.

However, in most cases, even after un-mounting, the binding will still be present with the Web Application.

Lets see, how to delete the database. Right click the database and click on Properties. Select the options page and set the ‘Restrict Access’ property to ‘SINGLE_USER’.

This will change the database to Single User state.

Now, if we right click the database and select delete option, the database will be deleted.

Summary - Thus, we saw how to delete a SharePoint Web Application un-mounted content database by setting it to Single User state.