SharePoint 2016, Sharepoint 2013, Sharepoint 2010, Windows Server 2012, Sql Server 2012,2014,IIS, Active Directory,User Profile Service, Managed MetaData Service, Search Service, Topology, Web Application, IIS, Site collection, List, Library, PowerShell, office web app, Windows Authentication, NTLM, Kerberos, Saml, ADFS, Active Directory Import, MIM, Deleting the Orphan Sites in the Sharepoint, 0x80070003 – SharePoint

Deleting the Orphan Sites in the Sharepoint, 0x80070003

Just think about the scenario

You are trying to clean up the Content Databases and deleting the all unused the database which are attached to SharePoint, usually you detach the Content DB from SharePoint then delete it from SQL. But what if you forget to detach it from SharePoint but you removed it from SQL Server. aH. Now you have all those sites showing the Central admin but no properties of them.


You are trying to create tons of site collection via batch script and some of sites collection failed to provision completely and become orphan in the SharePoint.

Solution # 1:

  • Try to run following powershell command to remove them.
    Remove-SPSite -Identity http://Sitecollection
  • But this throws the below error:
    fhhghgRemove-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack>At line:1 char:14

Solution # 2:

  • Try to use Old Fashioned Stsadm command.
    stsadm -o deletesite -force -siteid e2a114b8-80c9-41f6-87bf-3feddf2ad9b6 -databaseserver DS1 -databasename DB1
  • Again Luck is not with us and failed with the same error mentioned above.

Solution # 3:

  • Try to repair the content Db
    $db = Get-SPContentDatabase -Site <OrphanedURL>
  • Even this completed without any issue but Bad Sites still showing.

Solution 4:

  • Try to delete using SPContentDatbase Force Method
    $site = Get-SPSite http://siteurl
    $siteId = $site.Id
    $siteDatabase = $site.ContentDatabase
    $siteDatabase.ForceDeleteSite($siteId, $false, $false)
  • As soon as this scripted competed sucessfully, he Orphan Site gone from Central Admin


I am not guarantee which method will work in your situation, but all above list options which we are using in our farm to deleting the orphan stuff. In your case may be #1 work or #2 or may be #4 works. But I am sure Solution #4 will work for everyone.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *