Re: performance problem getting WMI "HostName" propertie
- From: "Doug" <dbb211-hd204@xxxxxxxxx>
- Date: Fri, 24 Feb 2006 10:11:27 -0800
You can also identify the fields you want in the Select query. The *
indicates you want ALL properties associated with the object. If all you need
is the HostName, your assignent could read:
.... New ManagementObjectSearcher(New WqlObjectQuery("SELECT HostName FROM
MSBTS_MessageInstance"))
Doug
"carlos medina" wrote:
hi....
you can use MSBTS_HOST class to query the host name... or if you want the
specific hostname associated to the message, you can query in
MSBTS_MessageInstance using the MessageInstanceID property to filter the
result... for example..
SELECT * FROM MSBTS_MessageInstance where
MessageInstanceID="{4CDB53CE-70B4-483E-829F-9295123455C1}"
you can get the {4CDB53CE-70B4-483E-829F-9295123455C1} value from MessageID
property....
"alex c" <alexeva42@xxxxxxxxxxx> wrote in message
news:6223AE6F-23A7-4D11-B8E3-69503FCB275A@xxxxxxxxxxxxxxxx
Hi to everybody:
I´m developing a email custom pipeline. I need to recover "HostName" from
WMI properties. I am using this code:
Dim m_mgMISearcher1 As ManagementObjectSearcher = _
New ManagementObjectSearcher(New WqlObjectQuery("SELECT
* FROM MSBTS_MessageInstance"))
m_mgMISearcher1.Scope = _
New ManagementScope("root\MicrosoftBizTalkServer")
m_mgMISearcher1.Options.ReturnImmediately = True
Dim m_mpGroupSettings1(m_mgMISearcher1.Get().Count) As
System.Management.ManagementBaseObject
m_mgMISearcher1.Get().CopyTo(m_mpGroupSettings1, 0)
Dim opSettings1 As ManagementObject
For Each opSettings1 In m_mpGroupSettings1
context.Write(GbpServicesHelper.EAI_CONTEXT_GLOBAL_PROPERTY_HOSTNAME,
GbpServicesHelper.EAI_CONTEXT_NAMESPACE,
opSettings1.GetPropertyValue("HostName"))
Next
Debugging I noticed there is a performance problem inside because
m_mgMISearcher1 variable is recovering all properties from
MSBTS_MessageInstance, i think my problem is in query bacuase I had to use
where clause but I don´t Know how to recover only the right property.
Due to it I have a performance problem (neckbottle) in this pipeline.
Any ideas?
Thanks in advance.
Thanks in advance
- Follow-Ups:
- References:
- Re: performance problem getting WMI "HostName" propertie
- From: carlos medina
- Re: performance problem getting WMI "HostName" propertie
- Prev by Date: Re: Deployment error: Access denied when adding a receive port
- Next by Date: Re: BRE Policy execution
- Previous by thread: Re: performance problem getting WMI "HostName" propertie
- Next by thread: Re: performance problem getting WMI "HostName" propertie
- Index(es):
Relevant Pages
|