SCOM DB issue

py 206 Reputation points
2020-08-19T12:32:48.433+00:00

Hello All,

Any advise will be much appreciated.

Here is the issue. We have a 2 node cluster DB server, Always ON
When installing new MS i used Server A to detect OperationsManager DB (My bad). Now when the server has failed over to Node B the data access service is stopped and unable to start it.

I have changed the name of the Database server name to Cluster name in the registry and restarted the server without success. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup

I have checked for the password of sdk service and it is ruled out as cause of the issue. The permissions for SDK service account is identical on both the DB server nodes and listener.

Below is the error from Management Server. I'm assuming since the DB server has failed over and the node A is in read only mode it is unable to start the service.

Log Name: Operations Manager
Source: OpsMgr SDK Service
Date: 8/19/2020 7:17:32 AM
Event ID: 26380
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer:
Description:
The System Center Data Access service failed due to an unhandled exception.
The service will attempt to restart.
Exception:

Microsoft.EnterpriseManagement.ConfigurationReaderException: Feature of type 'Microsoft.EnterpriseManagement.ServiceDataLayer.ClientSessionManager, Microsoft.EnterpriseManagement.DataAccessService.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be added to the container. ---> Microsoft.EnterpriseManagement.ConfigurationReaderException: The component named 'QueueRegistration' and of type 'Microsoft.EnterpriseManagement.ServiceDataLayer.QueueRegistrationService, Microsoft.EnterpriseManagement.DataAccessService.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be added to the container. ---> System.Data.SqlClient.SqlException: Failed to update database "OperationsManager" because the database is read-only.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.ExecuteReader(ExecuteArguments executeArguments, QueryResults& queryResults)
at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.Execute[T](ExecuteArguments executeArguments, RetryPolicy retryPolicy, GenericExecute1 genericExecute) at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.ExecuteReader(SqlCommand sqlCommand, IList1 prologEpilogList, IList1 projection, QueryDefinition queryDefinition, RetryPolicy retryPolicy) at Microsoft.EnterpriseManagement.DataAccessLayer.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest) at Microsoft.EnterpriseManagement.ServiceDataLayer.QueueRegistrationService.SetupBrokerService(String serviceName, String queueName) at Microsoft.EnterpriseManagement.ServiceDataLayer.QueueRegistrationService.Initialize(IContainer container) at Microsoft.EnterpriseManagement.SingletonLifetimeManager1.GetComponentK
at Microsoft.EnterpriseManagement.Container.GetServiceInternal[T](Type type, String name)
at Microsoft.EnterpriseManagement.Container.AddService[T,V](String name, ActivationContext1 context) --- End of inner exception stack trace --- at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ProcessComponent(String componentId, XPathNavigator componentNavigator, IDictionary2 pendingComponents, IContainer container)
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ReadComponents(XPathNavigator navi, IContainer container)
at Microsoft.EnterpriseManagement.ServiceDataLayer.ClientSessionManager.Initialize(IContainer container)
at Microsoft.EnterpriseManagement.SingletonLifetimeManager1.GetComponent[K]() at Microsoft.EnterpriseManagement.FeatureContainer.GetFeatureInternal[T](Type type, String featureName) at Microsoft.EnterpriseManagement.FeatureContainer.AddFeatureInternal[T,V](ActivationContext1 context, String featureName)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ReadFeatures(XPathNavigator navi, IContainer container)
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.Process()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.Initialize(InProcEnterpriseManagementConnectionSettings configuration)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.InitializeRunner(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="OpsMgr SDK Service" />
<EventID Qualifiers="49152">26380</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2020-08-19T12:17:32.197395000Z" />
<EventRecordID>7306213</EventRecordID>
<Channel>Operations Manager</Channel>
<Computer></Computer>
<Security />
</System>
<EventData>
<Data>Microsoft.EnterpriseManagement.ConfigurationReaderException: Feature of type 'Microsoft.EnterpriseManagement.ServiceDataLayer.ClientSessionManager, Microsoft.EnterpriseManagement.DataAccessService.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be added to the container. ---> Microsoft.EnterpriseManagement.ConfigurationReaderException: The component named 'QueueRegistration' and of type 'Microsoft.EnterpriseManagement.ServiceDataLayer.QueueRegistrationService, Microsoft.EnterpriseManagement.DataAccessService.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' cannot be added to the container. ---> System.Data.SqlClient.SqlException: Failed to update database "OperationsManager" because the database is read-only.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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&amp; dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.ExecuteReader(ExecuteArguments executeArguments, QueryResults& queryResults)
at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.Execute[T](ExecuteArguments executeArguments, RetryPolicy retryPolicy, GenericExecute1 genericExecute) at Microsoft.EnterpriseManagement.DataAccessLayer.SqlRetryHandler.ExecuteReader(SqlCommand sqlCommand, IList1 prologEpilogList, IList1 projection, QueryDefinition queryDefinition, RetryPolicy retryPolicy) at Microsoft.EnterpriseManagement.DataAccessLayer.QueryRequest.Execute(SqlNotificationRequest sqlNotificationRequest) at Microsoft.EnterpriseManagement.ServiceDataLayer.QueueRegistrationService.SetupBrokerService(String serviceName, String queueName) at Microsoft.EnterpriseManagement.ServiceDataLayer.QueueRegistrationService.Initialize(IContainer container) at Microsoft.EnterpriseManagement.SingletonLifetimeManager1.GetComponentK
at Microsoft.EnterpriseManagement.Container.GetServiceInternal[T](Type type, String name)
at Microsoft.EnterpriseManagement.Container.AddService[T,V](String name, ActivationContext1 context) --- End of inner exception stack trace --- at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ProcessComponent(String componentId, XPathNavigator componentNavigator, IDictionary2 pendingComponents, IContainer container)
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ReadComponents(XPathNavigator navi, IContainer container)
at Microsoft.EnterpriseManagement.ServiceDataLayer.ClientSessionManager.Initialize(IContainer container)
at Microsoft.EnterpriseManagement.SingletonLifetimeManager1.GetComponent[K]() at Microsoft.EnterpriseManagement.FeatureContainer.GetFeatureInternal[T](Type type, String featureName) at Microsoft.EnterpriseManagement.FeatureContainer.AddFeatureInternal[T,V](ActivationContext1 context, String featureName)
--- End of inner exception stack trace ---
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.ReadFeatures(XPathNavigator navi, IContainer container)
at Microsoft.EnterpriseManagement.ConfigurationReaderHelper.Process()
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.Initialize(InProcEnterpriseManagementConnectionSettings configuration)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DispatcherService.InitializeRunner(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart(Object obj)</Data>
</EventData>
</Event>

System Center Operations Manager
System Center Operations Manager
A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.
1,610 questions
0 comments No comments
{count} votes

Accepted answer
  1. SChalakov 10,576 Reputation points MVP Volunteer Moderator
    2020-08-19T14:54:43.393+00:00

    Hi @peewhy-0274,

    I think I can help here because I had a similar case with a customer of mine, who did the same. How I was able to resolve it? Perform a "Database Move" procedure by updating all the configurations. What you need to do is to update the "Node1\SCOM" instance configuration with the "Cluster(Listener)\SCOM" configuration.
    The best way would be to follow those two:

    How to move the Operational database
    and
    How to move the Reporting data warehouse database

    The DB config is not stored only in the registry and in the config file on the Mangement Server, but also in different DB tables. The articles will help you identify all the places, where you can adjust (update) the DB configuration.
    Using this approach we were able to solve the exact same challenge.

    Hope I was able to help. Regards,
    Stoyan
    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Leon Laude 86,026 Reputation points
    2020-08-19T13:07:14.903+00:00

    Hi,

    Which version of SCOM are you using? Did you go through the official documentation below?

    How to configure Operations Manager to communicate with SQL Server
    https://learn.microsoft.com/en-us/system-center/scom/manage-sqlserver-communication?view=sc-om-2019

    PS: Please hide any sensitive information in your post.

    ----------

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    Best regards,
    Leon

    1 person found this answer helpful.

  2. Crystal-MSFT 53,991 Reputation points Microsoft External Staff
    2020-08-20T02:46:07.727+00:00

    Hi,

    From your description, I know the System Center Data Access service is failed to start. The issue happens when the SQL DB Operations Manager failover from Server A to Node B.

    In the event log, it mentioned that we are Failed to update database "OperationsManager",the database is read-only.

    Based on my research, every availability replica is assigned an initial role-either the primary role or the secondary role, which is inherited by the availability databases of that replica. The role of a given replica determines whether it hosts read-write databases or read-only databases. One replica, known as the primary replica, is assigned the primary role and hosts read-write databases, which are known as primary databases. At least one other replica, known as a secondary replica, is assigned the secondary role. A secondary replica hosts read-only databases, known as secondary databases.
    https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server?view=sql-server-2017#AGsARsADBs

    I think our issue is that after failover, the database is still in read-only mode, which cause SCOM failed to write anything into the database and then the System Center Data Access failed to start.

    Given the situation, we can manually move the database to see if it is working. Or we can contact SQL support to check on SQL always on availability group failover issue.

    Hope it can help.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.