After upgrading a SharePoint 2013 On-Prem farm from June 2017 CU level to the January 2018 CU level, I encountered the following exception(s) on step 9 of 10 of the first run of the Configuration Wizard:
Configuration Failed
One or more configuration tasks failed. . .
Failed to upgrade SharePoint Products.
This is a critical task. You have to fix the failures before you can continue. Follow this link for more information about how to troubleshoot upgrade failures: ... An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException
was thrown. Additional exception information:
Error running SQL DDL Script: IF EXISTS (SELECT TOP 1 1 FROM sys.database_principals WHERE name = N'db_owner' A.... System.Data.SqlClient.SqlException (0x80131904):
Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not have permission.ClientConnectionId:7454882a-1aa0-43bc-bc05-84e79ec5d989Error Number:15151,State:1,Class:16
(EventID:al2pi)
Upgrade [SPSubscriptionSettingsDatabase Name=SPI_Prod_SubscriptionSetting...] failed. (EventID:ajxnm)
Exception: Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not have permission. (EventID:ajxnm)
(EventID:ajxnm)
Upgrade Timer job is exiting due to exception: System.Data.SqlClient.SqlException (0x80131904): Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not
have permission.
Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException: Exception of type 'Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException' was thrown.
at Microsoft.SharePoint.PostSetupConfiguration.UpgradeTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()
Running [PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures] failed with the same exception(s) at task 5 of 6:
The farm is being upgraded in the timer service process. The task is 14.71% completed.
Failed to upgrade SharePoint Products.
An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown. Additional exception information: The upgrade command is invalid or a failure has been encountered.
Error running SQL DDL Script: IF EXISTS (SELECT TOP 1 1 FROM sys.database_principals WHERE name = N'db_owner' A.... System.Data.SqlClient.SqlException (0x80131904): Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot
alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not have permission.ClientConnectionId:5395f82b-1016-4eb6-a18c-a11e7958406cError
Number:15151,State:1,Class:16 (EventID:al2pi)
Upgrade [SPSubscriptionSettingsDatabase Name=SPI_Prod_SubscriptionSetting...] failed. (EventID:ajxnm)
Exception: Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you
do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not have permission. (EventID:ajxnm)(EventID:ajxnm)
Upgrade Timer job is exiting due to exception: System.Data.SqlClient.SqlException (0x80131904): Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner', because it does not exist or you do not
have permission.Cannot alter the role 'db_owner', because it does not exist or you do not have permission.Cannot alter the role 'db_owner',because it does not exist or you do not have permission.
Research suggested a few possibilities.
Some forum posts showed some people who encountered this type of error could get past it by opening SQL Management Studio, drilling down to the subscription settings service database > drilling into the security folder of that database > drilling
further down to Users > finding and right-clicking the account that you're using to run the ConfigWiz in the list of users > Properties > Owned Schemas > select "db_owner" and click OK. But that didn't help me. I did it
several times and ran into the exact same exceptions every time I ran psconfigUI.exe or psconfig.exe. Also, the permissions I added were stripped away every time I ran configwiz.
Two forum posts I found suggested this was related to SQL Always-On and/or Availability-Groups. I removed the subscription database from the AO AG and that didn't help either. Same exceptions. But I did not set it from full recovery mode to simple
recovery mode like some suggested. So maybe I didn't go far enough with this.