Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
scroll top