Recently, an issue was reported where site admins were unable to remove a reference to an orphan site collection in SharePoint 2013. Here are some details of this site collection:
  • This site was inaccessible
  • This site was present in central admin --> View all site collections.
  • This site was not selectable although viewable in central admin --> delete site collection
  • In content database in the table Allsites, the field "Delete" was marked as 1 for this site collection
  • Remove-SPSite was throwing exception
To fix this issue we followed a series of steps very similar to SharePoint 2007.
  • We detached this content database from central admin
  • The following PowerShell command was executed to attach it back
Mount-SPContentDatabase "" -DatabaseServer "" -WebApplication "http://Site"

Other Languages


This article is also available in the following languages: