After the SharePoint Server 2013 version was patched last night (Windows patches, about 150 ones!!), of course - as expected - the databases were in upgrade mode on SharePoint. So I started SharePoint Config Wizard (not through Powershell) and on step 2 I got the message as follows:
Exception: System.Data.SqlClient.SqlException (0x80131904): User does not have permission to perform this action. You do not have permission to run the RECONFIGURE statement.
Checked first that all services ran with correct accounts, had to change two where Local System was set (why?? do not know), checked that the SQL services service was running on the SQL server, checked that the farm account still had DB_Creator rights on the content db's, and all seemed correct.
I have never seen this error before so I went to Google of course. Found an article (cannot remember where unfortunately) that said to add the farm account as a SysAdmin on the SQL server. And after that I could proceed with Config Wizard. But it ended with a failure. See below message (it is me who has added the X's in the text below):
An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown. Additional exception information:
Database [WSS_Content_MySites] contains a site (Id = [7e9181b9-ef7a-452c-a2ae-fxxxxxxx], Url = [/personal/xxxx]) that is not found in the site map. Consider detach and reattach the database. (EventID:ajxkz)
Feature (Id = [367b94a9-4a15-42ba-b4a2-324xxxxxx]) is referenced in database [WSS_Content_XXX], but isn't installed on the current farm. The missing feature might cause upgrade to fail. If necessary, please install any solution that contains the feature and restart upgrade. (EventID:ajxkh)
And etc....
So I started Powershell and ran this command:
psconfig.exe -cmd helpcollections -installall -cmd secureresources -cmd services -install -cmd installfeatures -cmd applicationcontent -install -cmd upgrade -inplace b2b -force -wait
And that fixed it. As usual, make sure to go into Central Administration and start the User Profile Synchronization service as that rarely starts after upgrades like this.
Also checked the Health Analyzer and got rid of all messages regarding upgrade needed.
Checked all services and last thing, click on "Upgrade and Migration" link in CA to see that the messages about Incompatibiliy range were reset to "No action needed".
CHECK!
Not sure what effects it will have to keep the farm account as SysAdmin at the SQL server but I will keep it for now!
Not too bad from having an emergency errand at 07.30 and be ready by 9 😉
Time for breakfast... 🙂