2

I run the product configuration wizard on my SharePoint server 2013, after a hot fix installation:-

psconfig.exe -cmd upgrade -inplace b2b -wait -force 

but i received the following exceptions, mainly that there are many orphans site collections:-

02/10/2016 01:10:16.35  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.35  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   ERROR   Database [WSS_Content] contains a site (Id = [70293d27-db5b-4f14-a2a7-cf089ffaf573], Url = [/kb/CustomerServiceKB]) that is not found in the site map. Consider detach and reattach the database.   6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.46  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.46  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.49  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.49  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   ERROR   Database [WSS_Content] contains a site (Id = [016ffbd0-7d5a-469d-83c5-e9b67dbb2ba3], Url = [/kb/customerservice]) that is not found in the site map. Consider detach and reattach the database. 6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.52  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.52  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.55  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.55  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   ERROR   Database [WSS_Content] contains a site (Id = [70293d27-db5b-4f14-a2a7-cf089ffaf573], Url = [/kb/CustomerServiceKB]) whose url is already used by a different site, in database (Id = [2611b773-88bc-4cc8-bebb-aa3cd238bc22], name = [WSS_Content]), in the same web application. Consider deleting one of the sites which have conflicting urls.    6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.58  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.58  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.76  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.76  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   ERROR   Database [WSS_Content] contains a site (Id = [016ffbd0-7d5a-469d-83c5-e9b67dbb2ba3], Url = [/kb/customerservice]) whose url is already used by a different site, in database (Id = [2611b773-88bc-4cc8-bebb-aa3cd238bc22], name = [WSS_Content]), in the same web application. Consider deleting one of the sites which have conflicting urls.  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.82  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   INFO    SPContentDatabase Name=WSS_Content  6dae5d9d-cc17-d003-e007-3995887e71c6
02/10/2016 01:10:16.82  OWSTIMER (0x0D64)   0x0C04  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  6dae5d9d-cc17-d003-e007-3995887e71c6
Timestamp               Process                                     TID     Area                            Category                        EventID Level       Message     Correlation
02/10/2016 01:14:24.26  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxmn   INFO    SPContentDatabase Name=SharePoint_AdminContent_e44bfe21-eac4-48b... 00000000-0000-0000-0000-000000000000
02/10/2016 01:14:24.26  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxmn   WARNING Exception occured when querying old feature with id [427741e7-6206-48ff-9f4c-53ffddda7f7d], skipping. Microsoft.SharePoint.SPException: Failed to find the XML file at location '15\Template\Features\Bamboo.SPWiki\feature.xml'     at Microsoft.SharePoint.SPXmlDocCache.GetGlobalXmlDocument(String pathTemplateRelativeXml, SPFeatureDefinition featdef, Int32 compatibilityLevel)     at Microsoft.SharePoint.Administration.SPFarmFeatureDefinitionContext.LoadFileAsXmlDocument(SPFeatureDefinition featdef, String featureRelativePath)     at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_Scope()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.PopulateFeaturesTable(StringBuilder sqlstr) 00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   ERROR   Database [WSS_Content] contains a site (Id = [70293d27-db5b-4f14-a2a7-cf089ffaf573], Url = [/kb/CustomerServiceKB]) that is not found in the site map. Consider detach and reattach the database.   00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxkz   ERROR   Database [WSS_Content] contains a site (Id = [016ffbd0-7d5a-469d-83c5-e9b67dbb2ba3], Url = [/kb/customerservice]) that is not found in the site map. Consider detach and reattach the database. 00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk0   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   ERROR   Database [WSS_Content] contains a site (Id = [70293d27-db5b-4f14-a2a7-cf089ffaf573], Url = [/kb/CustomerServiceKB]) whose url is already used by a different site, in database (Id = [2611b773-88bc-4cc8-bebb-aa3cd238bc22], name = [WSS_Content]), in the same web application. Consider deleting one of the sites which have conflicting urls.    00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk3   ERROR   Database [WSS_Content] contains a site (Id = [016ffbd0-7d5a-469d-83c5-e9b67dbb2ba3], Url = [/kb/customerservice]) whose url is already used by a different site, in database (Id = [2611b773-88bc-4cc8-bebb-aa3cd238bc22], name = [WSS_Content]), in the same web application. Consider deleting one of the sites which have conflicting urls.  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:14:52.09  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPContentDatabaseSequence   ajxk4   WARNING The orphaned sites could cause upgrade failures. Try detach and reattach the database which contains the orphaned sites. Restart upgrade if necessary.  00000000-0000-0000-0000-000000000000
02/10/2016 01:15:02.05  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxnm   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:15:02.05  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxnm   ERROR   Upgrade [SPContentDatabase Name=WSS_Content] failed.    00000000-0000-0000-0000-000000000000
02/10/2016 01:15:02.07  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxnm   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:15:02.07  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxnm   ERROR   Exception: Object reference not set to an instance of an object.    00000000-0000-0000-0000-000000000000
02/10/2016 01:15:02.08  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxnm   INFO    SPContentDatabase Name=WSS_Content  00000000-0000-0000-0000-000000000000
02/10/2016 01:15:02.08  PSCONFIG (0x1E64)   0x167C  SharePoint Foundation Upgrade   SPUpgradeSession    ajxnm   ERROR      at Microsoft.SharePoint.Upgrade.SPContentDatabaseIntegrity.CheckAppOrphans()     at Microsoft.SharePoint.Upgrade.SPContentDatabaseIntegrity.Check(SPContentDatabaseIntegrityCheckOptions options)     at Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence.ContentDatabaseDataIntegrityCheck()     at Microsoft.SharePoint.Upgrade.SPContentDatabaseSequence.PreUpgrade()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.Upgrade(Object o, Boolean bRecurse)  00000000-0000-0000-0000-000000000000

so i am trying to remove the orphans site collections , using the following command:-

$ContentDBColl = Get-SPContentDatabase
ForEach ($Database in $ContentDBColl)
{
   Write-Host "Detecting Orphans for " $Database.Name
   $Database.Repair($true)
} 

but i got the following error:-

Exception calling "Repair" with "1" argument(s): "Invalid object name 'TVF_AllDocs_DelIdUrl'. Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 0, current count = 1." At line:4 char:4 + $Database.Repair($true) + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : SqlException

as follow:- enter image description here

so can anyone advice on this please? Thanks

EDIT now i try removing the orphan site collection as follow:-

stsadm -o deletesite -force   -siteid 016ffbd0-7d5a-46
9d-83c5-e9b67dbb2ba3   -databasename WSS_Content  -databaseserver t***1\sha
repoint

but it raised the following exception:-

Invalid object name 'TVF_Sites_Id'. The 'proc_DeleteSite' procedure attempted to return a status of NULL, which is n ot allowed. A status of 0 will be returned instead.

1

Typically when these types of errors occur, it is best to abandon the Content Database. Create a new Content Database on the Web Application, then use Move-SPSite to migrate each Site Collection to the new database. Once you've migrated to the new Content Database, perform an iisreset, then detach the old Content Database.

  • so can you please specify the commands to do so ? or describe in more details the required steps in general ? – john Gu Feb 10 '16 at 16:15
  • More information about Move-SPSite can be found at technet.microsoft.com/en-us/library/ff607915.aspx. The cmdlet is simple: Move-SPSite http://siteUrl -DestinationDatabase NewDatabase – Trevor Seward Feb 10 '16 at 16:17
  • ok thanks ,, but now i use to have 8 site collections inside the content database, but after i dismount and mount the content database , i see 11 site collections under the content database.. the additional 3 site collection are old sites that i have removed (orphands) so do i need to move all the site collection to the new content database ? inclining orphans ?can u please adivce? – john Gu Feb 10 '16 at 16:21
  • 1
    Right, but why would you migrate what you're not using? Just migrate the Site Collections you need. – Trevor Seward Feb 10 '16 at 16:36
  • 1
    Ah you're stuck. I'd suggest you create a PSS case with Microsoft as they may give you what are otherwise unsupported methods to fix the issue. – Trevor Seward Feb 10 '16 at 17:46
0

I had Orphaned sites after running Move_SPSite. The solution for me was found on this webpage.

To summarise, get the orphaned site ID by running this command on the SharePoint Server:

stsadm -o enumallwebs -DatabaseName "ContentDB_Name"

Then:

stsadm -o deletesite -force -SiteID **ORPHANED SITE ID** -DatebaseName "ContentDB_NAME" -DatabaseServer "SQL_Server"

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.