BizTalk Server General - Speed of WMI vs HAT

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > August 2005 > Speed of WMI vs HAT





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Speed of WMI vs HAT
Neal Walters

2005-08-26, 5:55 pm

1) Does HAT use WMI to create reports, or does it go against SQL directly?

2) The following query takes about 6 minutes in WMI with VB/Script.
It produces a list of 4 suspends orchestrations. HAT creates the same
information in about 5 seconds.

Query = "select * from MSBTS_ServiceInstance where ServiceName =
'orProcessOrder' " & _
" and ServiceStatus = 32 " ' 32 = suspend instances?

Set objSet =
GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(Query)

Any suggestions?

Thanks,
Neal Walters
http://Biztalk-Training.com - Self-Study Biztalk Video CD/ROMs


Neal Walters

2005-08-26, 5:55 pm

I finally found the query that HAT runs for "Operations/Service Instances".
I ran the SQL profiler and traced it. The surprise is that the Stored Proc
is not in the DTA database, but in the BiztalkMsgBoxDb.

use BiztalkMsgBoxDb
exec MBOM_LookupInstances @nvcHost = NULL, @nServiceClass = 1,
@uidServiceType = NULL, @uidInstanceID = NULL, @nvcUserState = NULL, @nStatus
= 63, @nPendingOperation = 15, @dtFrom = NULL, @dtUntil = NULL, @nMaxMatches
= 200

Neal Walters
http://Biztalk-Training.com


Neal Walters

2005-08-26, 5:55 pm

I'm trying to automate the termination of various suspended service instances.
I finally got the SQL to work to produce the same report as HAT, but then
the question arises how to Terminate selected orchestrations. All the
example WMI scripts loop through a result set and perform some action
(enlist, unenlist, terminate, etc...) based on selection criteria.

So now I'm back where I started, I wrote the SQL, but I have to run a WMI
select/loop to do the terminate, and it takes 5 minutes vs the 5 second SQL
query.

Any ideas??? I'll probably write a Blog on this when I'm done.
Meanwhile, I'll try to see if there is an SQL Stored Proc called loosely
called 'Terminate Instance' that maybe WMI calls.

Thanks,
Neal Walters
http://Biztalk-Training.com

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com