Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Thu, 31 Jul 2008 07:58:26 -0700 (PDT),    group: microsoft.public.win32.programmer.wmi        back       


Script very slow calling SwbemObjectSet.Count   
Hi,

I have a WMI script which is taking almost 2 minutes to return me a
count of the number of items in an SwbemObjectSet returned from
ExecQuery.  This happens even when the set is empty!  Code snippet
below:

Set objBizTalk = GetObject( "Winmgmts:!root\MicrosoftBizTalkServer" )
strQuery2 = "SELECT * FROM MSBTS_MessageInstance" & _
                            " WHERE ServiceName <> """" AND
(ServiceInstanceStatus=4 OR ServiceInstanceStatus=32)"
Set objInstSet2 = objBizTalk.ExecQuery( strQuery2 )
suspMesgCount = objInstSet2.Count

From putting echos in the script, I can see that all the time is spent
executing objInstSet2.Count.  I understand that this enumerates
through the set couting up how many items are in it, but surely if
there's nothing there then it should not take any time at all?  The
same happens if there are items in the collection.  Other WMI queries
(e.g. to get the number of services) which do similar things using
different providers work fine.

Is the problem the MicrosoftBizTalkServer WMI provider?  And if it is,
is there anything I can do about it?  I have tried specifying a
forwards only collection, but that makes no difference.

Thanks for any help,
Al.
date: Thu, 31 Jul 2008 07:58:26 -0700 (PDT)   author:   Al Henderson

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us