Count of Active or Started Messages in BizTalk.
This script will give you a count of active messages within BizTalk. This includes currently processing messages, as well as suspended resumable messages. Run this against the BizTalkDTADb.
set nocount on set transaction isolation level read COMMITTED set deadlock_priority LOW SELECT COUNT(*) FROM dbo.dtav_ServiceFacts WHERE [ServiceInstance/State] = 'Started'