BizTalk Gurus

DB Table of Receive Location Properties

Latest post 10-04-2008 6:07 AM by ruselw. 2 replies.
  • 10-03-2008 6:58 AM

    DB Table of Receive Location Properties

    Does anybody know where some of the receive location properties such as pollingInterval, connection string etc.. get stored in the database. We are trying to generate some audit reports based on those fields and I almost seached all databases and did not get any hit.

    Appreciate your help!

  • 10-03-2008 8:50 AM In reply to

    Re: DB Table of Receive Location Properties

     Hi,

    You can write a small program to get Receive Location properties through WMI MSBTS_ReceiveLocation or Microsoft.BizTalk.ExplorerOM

     

     

    Example:

    Using WMI MSBTS_ReceiveLocation :

    ReceiveLocationQuery= "SELECT * FROM MSBTS_ReceiveLocation"

     //Create the WMI search object.

     

     

     

     

    Using Microsoft.BizTalk.ExplorerOM

    Create the root object and set the connection string
                    BtsCatalogExplorer catalog = new BtsCatalogExplorer();
                    catalog.ConnectionString = ConfigurationManager.ConnectionStrings
                        [Constants.BIZTALK_MGTDATABASE_CONNECTION].ConnectionString;
                    string receiveLocationName = string.Empty;
                    foreach (ReceiveLocation receiveLoc in
                                    catalog.ReceivePorts[inboundReceivePort].ReceiveLocations)
                    {
                        if (inboundAddress == receiveLoc.Address)

                        {
                            receiveLocationName = receiveLoc.Name;

                            break;
                        }
                    }

     

     

    //Create the WMI search object.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    ManagementObjectSearcher Searcher = new ManagementObjectSearcher

    ();

     

     

    // create the scope node so we can set the WMI root node correctly.

     

     

    ManagementScope scope = new ManagementScope(Constants

    .MGT_SCOPE);

    Searcher.Scope = scope;

     

     

    // Build a Query to enumerate the MSBTS_ReceiveLocation instances if an argument

     

     

    // is supplied use it to select only the matching RL.

     

     

    SelectQuery query = new SelectQuery

    ();

    query.QueryString = ReceiveLocationQuery;

     

     

    // Set the query for the searcher.

    Searcher.Query = query;

     

     

    // Execute the query and determine if any results were obtained.

     

     

    ManagementObjectCollection

    queryCol = Searcher.Get();

     

     

    //Get the Recive Location Name from InboundTransportURL property

     

     

    foreach (ManagementBaseObject envVar in

    queryCol)

    {

     

     

    PropertyDataCollection

    envVarProperties = envVar.Properties;

     

     

     

    foreach (PropertyData envVarProperty in

    envVarProperties)

    {

     

     

    if ((envVarProperty.Name.Equals(Constants

    .INBOUND_TRANSPORT_URL)) &&

    (inboundAddress.Equals(envVarProperty.Value)))

    {

     

     

    //Set the reciveLocationName from the InboundTransportURL property

    receiveLocationName = envVar[

     

    "Name"

    ].ToString();

     

     

    break

    ;

     

     

  • 10-04-2008 6:07 AM In reply to

    Re: DB Table of Receive Location Properties

    The ESB Guidance might be helpful too (http://www.codeplex.com/esb).  It includes a BizTalk Operations Service that let's you access BizTalk management data such as receive location info.

    -Russell Waltz

Page 1 of 1 (3 items) | RSS