Sometimes, psconfig fails and you are unable to upgrade the farm due to problems associated with a content database due to various upgrade-blocking issues discovered in the content database. Perhaps it's a development farm, and you are testing a content database having a various missing items or other issues. Not to worry. You can still upgrade the farm: just leave the problematic content database out of the initial upgrade. Then, once you get the farm upgraded successfully, you can go back to the content database, mount it, troubleshoot it, and then upgrade it individually. Here's what you do:
- After executing psconfig and it fails, review the upgrade report and identify which content database was raising upgrade-blocking problems.
- Next, launch an elevated SharePoint Management Shell (if you haven't done so already) and execute the following commandlet to generate a list of content databases and their IDs:
Get-SPContentDatabase | Select -Property Name,ID,WebApplication, @{e={$_.CurrentSiteCount};l='Sites'}, @{e={($_.DiskSizeRequired/1GB).ToString("0.##")};l='Size(GB)'} | ft -auto
This commandlet generates a listing of content databases that conveniently also lists the number of sites in the content database as well as its site (in GB). - Note down the ID of the problematic content database.
- In the same SMS, execute this commandlet to dismount the content database from the farm:
Dismount-SPContentDatabase -Identity "[database ID]" -Confirm:$False
- Now re-execute psconfig:
PSCONFIG -cmd upgrade -inplace b2b -wait
- Once the farm is successfully upgraded, mount the problematic content database using this commandlet:
Mount-SPContentDatabase -Name "[database name]" -DatabaseServer "[alias]" -WebApplication "[web application URL]"
Once you mount the content database, you will eventually see the usual health rule issue popping up, "Databases running in compatibility range: upgrade recommended." - Review the Upgrade log files to identify the upgrade-blocking issues that prevented upgrade earlier.
- Once you get these issues resolved, execute the following commandlet:
Upgrade-SPContentDatabase -Identity [database ID or name] -UseSnapshot
Use the -UseSnapshot switch to enable your users to continue to at least read their content while the upgrade process engages. - If this still fails, use the data generated by the test upgrade report to guide your troubleshooting efforts. First, dismount the database again, and then run this commandlet:
SCRIPT Test-SPContentDatabase -name "[database name]" -webapplication "[web app URL]" | Export-CSV -Path "C:\UPGRADE.TEST.001.CSV"
- tbd
References
- Psconfig command-line reference (SharePoint Server 2010)
- Why I prefer PSCONFIGUI.EXE over PSCONFIG.EXE
- Dismount-SPContentDatabase
- SharePoint 2013: Review of the SharePoint Setup User Account and its use with Psconfig
- Upgrade-SPContentDatabase
- SharePoint 2016: Databases running in compatibility range, upgrade recommended
- SharePoint 2013: Product Configuration Wizard stuck on task 9 of 10
Notes
- If you run psconfigui.exe and it fails, this failure will be entered into the Upgrade Status page in Central Administration. Oddly, I have found that if I run psconfigui.exe again and it succeeds, this success won't be entered into the Upgrade Status list, even though the psconfigui.exe dialog plainly states that the upgrade succeeded. What I have done then, to ensure that successful configuration is also noted on the Upgrade Status page, is to execute psconfig.exe (the non-UI version), and the successful completion of this is then reflected in the Central Administration Upgrade Status page.
No comments:
Post a Comment