Suddenly today in the Upgrade n Migration tab in CA on checking the status of the DB two SiteCollections DB's showed

"Database is in compatibility range and upgrade is recommended" in PROD.

No recent changes were made apart from the news from DB this morning saying that they saw this error in DB Cluster node "Server Name1/2" was removed from the active cluster membership and "The Cluster service is shutting down because quorum was lost"

Is it recommended to run this in PROD, will that cause any problems

 PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures 


  • This is not a new installation we migrated from (07-13)10 months ago and everything was working fine until this morning. Please advise.

New Update - It was brought to my attention that the Patching team did some Security Patch installs and I am getting below errors in the CA enter image description hereenter image description here

Do I run PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

enter image description here

enter image description here

4 Answers 4


You don't need to run PSCONFIG if this warning has been raised by content database and in this case, you should use the following cmdlet to upgrade all content database raise this warning

Get-SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase

In case of the database is non-content database like search database , you should run PSCONFIG on all SharePoint servers within farm starting with the server that host Central Admin

PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

For more details, Please check Database running in compatibility range upgrade recommended

  • This issue is still not fixed and looks like patching team did some installs and it still throws the errors in CA.I just don't want to run the PSConfig and if it fails it will bring down the CA. Do I still run the Get-SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase Commented Aug 4, 2016 at 21:02
  • Thanks for the response, I ran this before seeing your message and got the error(latest screenshot). I ran this PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures. I will try running the SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase. Sorry :( Commented Aug 5, 2016 at 0:57
  • All my DB's are upgraded except the IT DB(Screenshot) not sure what that error is.My CA is also down what do I do next. Commented Aug 5, 2016 at 21:58
  • Did you run ps config on all SharePoint servers ? if yes try to dismount this database then run ps config to all SharePoint servers to let CA up , then mount database again to web application and upgrade it Commented Aug 6, 2016 at 9:07
  • No I didn't run it on all I just ran it on one and it threw the error and I stopped, do I unmount the CA DB or all DB's then run PSConfig and mount it back. Commented Aug 8, 2016 at 14:57

This issue can also be caused by the SharePoint patching removing the SQL SPDataAccess permission on the SharePoint databases from the Farm service account. Add it back in and most of these errors disappear.


You have to check the logs to get the clue what happen, but as per my experience it can be happen due to multiple reasons(everyone situation different)

  • may be any patch installed via Windows update(security patch for sharepoint)
  • any site collection restored from previous level
  • or any list/document library restored via some 3rd part tools which need upgrade( this was one of our situation)

If it is only for site collections( content database) then you can try to run upgrade-spcontentdatabase against your Dba. Hopefully this fix the problem

  • Sarwar My Patching Team did some security installs on different weekends and looks like I get the above errors in CA I looked at the Upgrade Logs but its not very helpful, do I try running Get-SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase If this fails will that bring the CA down. Commented Aug 4, 2016 at 21:05
  • if they did the Security patches and DB status saying Upgrade required, then you have to Run the PSconfig Wizard. it will fix the issue....the command you mentioned will upgrade the Content DB and not impact the CA. But still uneed config wizard
    – Waqas Sarwar MVP
    Commented Aug 4, 2016 at 21:07
  • is there a order in which I run the PSConfig or just run it on the server hosting the CA or it has to be run in all the servers throwing errors. Commented Aug 4, 2016 at 21:14
  • it has to be run on all servers one by one, I would start from the CA followed by others
    – Waqas Sarwar MVP
    Commented Aug 4, 2016 at 21:15

This answer is just an extension / special case of the answer from @Mohamed El-Qassas MVP♦

In our case the script

Get-SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase

did not work first at all, because Get-SPContentDatabase (without specifying the ID of the problematic DB explicitly) did not returned the content DB suffering from the problem. As it turned out shortly, the reason was, that the content DB was not assigned to any web application. It was removed from its web application previously in an attempt to fix an issue with a CU installation (see https://sharepointumar.wordpress.com/2019/07/06/psconfig-failed-with-attempt-to-register-null-pointer-at-sharepoint-2019/), like:


The database was returned however by the cmdlet Get-SPDatabase, so a possible workaround could have been:

Get-SPDatabase | ? { $_.Type -eq 'Content Database' } | % { Get-SPContentDatabase $_.ID } | ? { $_.NeedsUpgrade } | % {
  Write-Host Upgrading content DB $_.Name with ID $_.ID
  Upgrade-SPContentDatabase $_.ID -Confirm:$false

Unfortunately, it did not help a lot. Although it resulted first:

100.00% : SPContentDatabase Name=YourContentDB
Finalizing the upgrade...

Finaly we received an error:

Upgrade-SPContentDatabase : Fail to find the parent SPWebApplication when upgrading Content Database SPContentDatabase

Lessons learned:

  • Get-SPContentDatabase returns only content DBs bound to a web application, if the ID of the DB is not explicitly specified. It seems to iterate through the web applications and displays the content DBs for each. It consider it to be a bug.
  • You can only upgrade content DBs by Upgrade-SPContentDatabase that are attached to a web application. This one might be a result of the first point, however.

How we solved the issue? First attach the content DB back to the web application:

$db = Get-SPContentDatabase 7f29fee9-4827-403e-ba23-11e0e34e16c2

And upgrade the DB in the next (and last) step:

Upgrade-SPContentDatabase $db.Id -Confirm:$false

Just a last comment yet. We've also tried to upgrade the DB like


but it resulted in a failure either:

Exception calling "Upgrade" with "1" argument(s): "The global session cannot be used to perform an upgrade operation."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.