0

I have a Web app(SharePoint 2019 on-premise, App server and DB server) with each site collection having its own content database. One of the demo content DB is deleted using MSSQL Server Management Studio. The demo site collection became orphaned site collection.

Issue #1: Unable to delete the demo site collection in Central Admin.

Issue #2: After navigating to Central Admin > Application Management > Manage content databases. I still see the "WSS_Content_Demo" in the list.

What is best practice to handle this?

  1. Any PowerShell scripts to delete orphaned site collection & Content DB of "WSS_Content_Demo"?
  2. For content DB "WSS_Content_Demo", can I just check the Remove content database to delete it?
  1. WSS_Content_Demo DB in SQL server not exist.
  2. WSS_Content_Demo in Central Admin's Content Databases exists.
  3. Demo site collection exists.

What is the correct order to clean orphaned site collection & oprhaned content_DB(CA)? I tried this solution to remove forced delete site collection but hit error (i believe due to SQL DB not exist):

Cannot open database "WSS_Content_Demo" requested by the login. The login failed.

0

You got two options, either detach the database using either PowerShell (Dismount-SPContentdatabase which is the same as selecting "Remove content database" in Central Admin) or use the option in Central admin first and then remove it from SSMS.

Or you can use Remove-SPContentDatabase cmdlt to remove the content database and it's connections in SharePoint which deletes it completely.

4
  • Hi Chris, thanks for the response. In my case, the content DB is already been deleted in SSMS, however it still exist in Central Admin > Manage Content Databases' listing. The site collection still exits View all site collectins (I think exists in Config DB). If I am not misunderstand, the option you suggest was assuming content DB still exists in SSMS? Sep 10 '20 at 2:02
  • Try to dismount it using the ps-cmd and see if that helps. Sep 10 '20 at 4:46
  • Hi, I've tried it in DEV. Yes, it works. Once done Remove content database, the orphan site collection is no longer exist in list of View Site Collection. Many thanks. Sep 10 '20 at 5:55
  • Super. It's important to remove it correctly from SP, otherwise it still think it exists. :) Sep 10 '20 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.