I had a client that I was applying a patch to and the PSConfig failed. Usually, I know that if it fails once, for good measure you are supposed to try to run the PSConfig again (always run as administrator with the install account)…..but it failed again. Okay….what’s going wrong? I looked more into the logs and it told me that the Usage and Health database was part of a mirror or availability group.
04/10/2015 09:01:33.82 OWSTIMER (0x530C) 0x3FC8 SharePoint Foundation Upgrade SPUpgradeSession aj0ur ERROR Upgrade Timer job is exiting due to exception: System.Data.SqlClient.SqlException (0x80131904): The operation cannot be performed on database “SP13_UsageAndHealth” because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group. ALTER DATABASE statement failed. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
Once I removed the Usage and Health database from the availability group, and ran the PSConfig again, it succeeded.
Is this a database that really shouldn’t be in the AlwaysOn availability group? That’s odd to me. I wonder if newer patches will recognize this, and allow this database to be in the AlwaysOn availability group.