I am attempting to monitor the orchestration count from my BizTalk Server using a SQL Query in Solarwinds. I am using the following SQL Query:
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
SET DEADLOCK_PRIORITY LOW
SELECT o.nvcName AS Orchestration, COUNT(*) as Count,
CASE i.nState
WHEN 1 THEN 'Ready To Run'
WHEN 2 THEN 'Active'
WHEN 4 THEN 'Suspended Resumable'
WHEN 8 THEN 'Dehydrated'
WHEN 16 THEN 'Completed With Discarded Messages'
WHEN 32 THEN 'Suspended Non-Resumable'
END as State
FROM [Instances] AS i WITH (NOLOCK)
JOIN [BizTalkMgmtDb]..[bts_Orchestration] AS o WITH (NOLOCK) ON i.uidServiceID = o.uidGUID
GROUP BY o.nvcName, i.nState
ORDER BY 1,2,3
I am unsure how to generate an output to this via a statistic threshold. Does anyone have any experience with SQL Queries and Solarwinds?
The error I get when running a test is 'Query must return 1 row'.
Thanks