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
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.