Throughout the weekend the DeltaSyncs have run smoothly again. Setting the compatibility level to the minimum required version (SQL 2016 - 130) seems to have done the job.
SCOM 2019 SQL compatibility level
I'm investigating an issue with the DeltaSynchronization in a SCOM 2019 environment (already checked and adjusted the ConfigService.config with a higher timeout and checked the MAXDOP settings, with no avail), and was wondering if the compatibility level of the SQL databases could be the issue. The databases run on SQL 2016 SP2 CU16 but with compatibility level 'SQL Server 2012 (110)', possibly a remnant of previous upgrades (it started with SCOM 2012 R2 a long time ago). As the documentation suggests SCOM 2019 only supports SQL 2016 and up, but before I made such an impactful adjustment as changing the compatibility level, I thought to ask around.
Might this be something that has to be done for having a SCOM-supported SQL version, regardless of the issues we're having?
System Center Operations Manager
SQL Server | Other
3 additional answers
Sort by: Most helpful
-
Tom Phillips 17,776 Reputation points
2021-04-12T20:00:06.36+00:00 The compatibility level only affects very specific functions in SQL Server. It is unlikely changing the compatibility level will have any effect your your issue, positive or negative.
-
Crystal-MSFT 54,191 Reputation points Microsoft External Staff
2021-04-13T01:57:18.967+00:00 @EvH , For SCOM 2019, in our official article, if it hosts reporting Server, Data Warehouse, and ACS database, we recommend to consider upgrading SQL to 2016 and install the latest service Packs or higher version to avoid some unknown issues.
https://learn.microsoft.com/en-us/system-center/scom/plan-sqlserver-design?view=sc-om-2019#sql-server-requirementsWe can schedule a time to do the upgrade and see if the issue will disappear.
Hope it can help.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. -
EvH 116 Reputation points
2021-04-13T09:07:42.56+00:00 @Crystal-MSFT , it's mainly about these events with ID 29181:
OpsMgr Management Configuration Service failed to execute 'DeltaSynchronization' engine work item due to the following exceptionMicrosoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessException: Data access operation failed
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperation.ExecuteSynchronously(Int32 timeoutSeconds, WaitHandle stopWaitHandle)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.ExecuteOperationSynchronously(IDataAccessConnectedOperation operation, String operationName)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.WorkItemCompleted(IConfigServiceEngineWorkItemHandle workItemHandle, IConfigServiceEngineWorkItemResult workItemResult)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.SharedWorkItem.ExecuteWorkItem()
at Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.ConfigServiceEngineWorkItem.Execute()-----------------------------------
System.Data.SqlClient.SqlException (0x80131904): Sql execution failed. Error 50000, Level 16, State 1, Procedure WorkItemMarkCompleted, Line 61, Message: Failed to report work item completion. Work item with id 32992532 is not assigned to service instance 'SCOMSERVER\Default'
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)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, String endMethod, Boolean isInternal)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.NonQuerySqlCommandOperation.SqlCommandCompleted(IAsyncResult asyncResult)
ClientConnectionId:9d76e46d-8429-405b-adaa-ce1b46dc5ecf
Error Number:50000,State:1,Class:16OpsMgr Management Configuration Service failed to execute 'LocalHealthServiceDirtyNotification' engine work item due to the following exception
Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperationTimeoutException: Exception of type 'Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperationTimeoutException' was thrown.
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperation.ExecuteSynchronously(Int32 timeoutSeconds, WaitHandle stopWaitHandle)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.ExecuteOperationSynchronously(IDataAccessConnectedOperation operation, String operationName)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.IsAgentDirty(Guid agentId, LastAgentChangeCookie& lastAgentChangeCookie)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.LocalDirtyNotificationWorkItem.ExecuteWorkItem()
at Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.ConfigServiceEngineWorkItem.Execute()OpsMgr Management Configuration Service failed to execute 'DirtyNotification' engine work item due to the following exception
Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperationTimeoutException: Exception of type 'Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperationTimeoutException' was thrown.
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperation.ExecuteSynchronously(Int32 timeoutSeconds, WaitHandle stopWaitHandle)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.ExecuteOperationSynchronously(IDataAccessConnectedOperation operation, String operationName)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.GetDirtyAgentList(Int32 maxAgentBatchSize)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Engine.DirtyNotificationWorkItem.ExecuteSharedWorkItem()
at Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.SharedWorkItem.ExecuteWorkItem()
at Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.ConfigServiceEngineWorkItem.Execute()When running the SQL query:
SELECT * FROM cs.WorkItem WHERE WorkItemName = 'DeltaSynchronization'
order by StartedDateTimeUtc desc
the results show WorkItemStateId 15 and 10 most of the time, with a couple of results with WorkItemStateId 20. So it does complete once in a while, but most of the time it simply times out and tries again 10 minutes later.
We already increased the "DefaultTimeoutSeconds" and "GetEntityChangeDeltaList" in the ConfigService.config file on all our management servers and also increased the "SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Data Warehouse\Command Timmeout Seconds" registry setting. The only effect visible is that the DeltaSyncs take a longer time to timeout.