Wednesday 26 August 2015

SharePoint 2013 returns to 'upgrade required' status

Hi all,

This post is related to the fact that after upgrading your SharePoint Farm with success, you are faced again with some servers in the "Upgrade Required" status.

As this issue was still coming and coming after each try to re-upgrade my farm, I decided to open a case at Microsoft support.

So, hereunder, you can find the resolution steps that will bring your smile back.


In summary, if one or several servers (my production farm is composed by 25 servers) are going back to the "Upgrade Required" after being marked as "No Action Required" during few days, check first if you don't have some sites that were not upgraded.
In this case, only 1 Site Collection wasn't correctly upgraded, and after a manual upgrade (via powershell cmdlets), all was solved.



Here is the case summary for your records:
==================
Title: SHP2013 returns to 'upgrade required' status
Severity: B
Status: Resolved and Closed

ACTION/RESULT:
Customer reported that after completing the upgrade to CU December 2014 (more than once) on the SharePoint 2013 farm - some the "Servers in this Farm" were still showing "Upgrade Required"

CAUSE/RESOLUTION:
In a previous upgrade attempt, there was the indication of a Site Collection that was not provisioned correctly:
07-24-2015 13:12:59.59 OWSTIMER (0x1CEC) 0x1F5C SharePoint Foundation Upgrade SPSiteWssSequence alsj5 WARNING SPWeb [https://mysite.sharepoint.me/sites/myname] [MyName, MyFirstName] is in a partially provisioned state. 021f1d9d-33b4-00ca-36cd-9ce05d7b2e40

Running (Get-SPSite https://mysite.sharepoint.me/sites/myname).NeedsUpgrade showed that this needs to be upgraded.
Customer ran the script:
$dir = Get-Location
$file = "$dir\farmSCUpgradeRequired.txt"

#Sites
Get-SPWebApplication -includecentraladministration | ForEach-Object {
               $webappurl = $_.Url
               $_.Sites | ForEach-Object {
                              "{0};{1};{2}" -f $webappurl, $_.URL, $_.NeedsUpgrade
               }
} | Out-File $file
This showed that the site collection mentioned before was in fact the only one needing an upgrade.

Customer run the powershell command:
  Upgrade-SPSite https://mysite.sharepoint.me/sites/myname -versionupgrade

The Site Collection was upgraded successfully.

After this, customer ran the "Product Version Job" timer job, and only 2 servers were still showing "Upgrade Required".
Running "stsadm -o localupgradestatus" showed only for these 2 servers, the following error message:
  <object>
    <name>Sharepoint_SA_UserProfile_Profile</name>
    <type>Microsoft.Office.Server.Administration.ProfileDatabase</type>
    <level>2</level>
    <status>Cannot Upgrade</status>
  </object>
  <object>
    <name>Sharepoint_SA_UserProfile_Social</name>
    <type>Microsoft.Office.Server.Administration.SocialDatabase</type>
    <level>2</level>
    <status>Cannot Upgrade</status>
  </object>

This means that the servers had something different than the rest of the servers, as the Databases were already up to date.
Running Get-SPDatabase | where {$_.Name -like "*UserProfile*"} | ft Name, NeedsUpgrade, NeedsUpgradeIncludeChildren, CanUpgrade also showed the information for these databases on the affected servers.

As this issue could only be on the servers, running the Configuration Wizard on both affected servers, made the message "Upgrade Required" go away.
After some days, the servers are still on a stable state.
=================



That's all folks