Hi!
We got some performance issue on the SQL server containing the OPS DB. The CPU is almost always running on 100%. Checked which query / process are the most expensive ones in SQL Management Studio. I found the same query 4-5 times running:
(@HealthServiceTypeId uniqueidentifier,@RelationshipTypeId uniqueidentifier,@HostEntityId_InElem0 uniqueidentifier)-- TargetComputerHealthService <HealthServiceTypeId,RelationshipTypeId,HostEntityId_InElem0>
SELECT [MEGV].[Id],[MEGV].[Name],[MEGV].[Path],[MEGV].[FullName],[MEGV].[DisplayName],[MEGV].[IsManaged],[MEGV].[IsDeleted],[MEGV].[LastModified],[MEGV].[TypedManagedEntityId],[MEGV].[MonitoringClassId],[MEGV].[TypedMonitoringObjectIsDeleted],[MEGV].[HealthState],[MEGV].[StateLastModified],[MEGV].[IsAvailable],[MEGV].[AvailabilityLastModified],[MEGV].[InMaintenanceMode],[MEGV].[MaintenanceModeLastModified],NULL
AS SourceEntityId,[MEGV].[TimeAdded],[MEGV].[LastModifiedBy],[BME].[BaseManagedEntityId] AS [HealthServiceId],[TME].[ManagedTypeId] AS [HealthServiceTypeId],[BME2].[DisplayName] AS [HostDisplayName],[BME2].[TopLevelHostEntityId] AS [HostEntityId],[HSC].[RelationshipTypeId]
AS [CommunicationTypeId]
FROM dbo.TypedManagedEntity AS TME
INNER JOIN dbo.BaseManagedEntity AS BME
ON BME.[BaseManagedEntityId] = TME.[BaseManagedEntityId]
INNER JOIN dbo.ManagedEntityGenericView AS MEGV
ON MEGV.[Id] = BME.[TopLevelHostEntityId]
INNER JOIN dbo.Relationship AS HSC
ON HSC.[TargetEntityId] = BME.[BaseManagedEntityId]
INNER JOIN dbo.BaseManagedEntity AS BME2
ON BME2.[BaseManagedEntityId] = HSC.[SourceEntityId]
WHERE (((TME.[IsDeleted] = 0) AND (MEGV.[IsDeleted] = 0 AND MEGV.[TypedMonitoringObjectIsDeleted] = 0) AND (HSC.[IsDeleted] = 0) AND (TME.[ManagedTypeId] = @HealthServiceTypeId) AND (HSC.[RelationshipTypeId] = @RelationshipTypeId)))
AND ([BME2].[TopLevelHostEntityId] IN (@HostEntityId_InElem0))
The processes running these queries consume no Memory according to Activity monitor, has a state of Runnable or Running, but almost never finish. Almost every time the "host name" is only one of the management servers, the Application is the SC DAL --MOMSDK.
I looked around in MPs, overrides, for this exact management server, but found nothing so far. The Antivirus is disabled on the SQL and on the management server, but still no decrease of the CPU usage. If the Data Access service is restarted on the Management server, the CPU usage returns to 10-15%, but only for a short time. Tried an agent reset, reboot, Repairing the SCOM management server installation, Setting this mgmt server for RMSE, let it run, then switch to other server, but nothing.
Do you have any advise?
Thank you in advance,
Gergő