SQL Query MP

Hi All,

Does this MP work in SCOM 2012 R2. IF yes, then please guide us how can we achieve the below mentioned request for monitoring.

Request

SCOM perform a SQL query?

If the output of the query is more than 50, an alert should be generated.

These three queries should be executed (apart from each other):

  1. Select count (*) FROM [dbo].[Workspaces] (NOLOCK) where Status = \\\’New\\\’
GO
  1. Select count (*) FROM [dbo].[Workspaces] (NOLOCK) where Status = \\’New\\’

GO

3.Select count (*) FROM [dbo].[Workspaces] (NOLOCK) where Status = \\’New\\’

GO

 

Thanks & Regards

Kumar

I believe this is possible using this MP.

Alternatively, you can load the SQL Module and use the PowerShell MP: https://cookdown.com/scom-essentials/powershell-authoring/