Home Page › Forums › BizTalk 2004 – BizTalk 2010 › DB Table of Receive Location Properties
- This topic has 2 replies, 1 voice, and was last updated 9 years, 1 month ago by
community-content.
-
AuthorPosts
-
-
October 3, 2008 at 6:58 AM #20900
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!
-
October 3, 2008 at 8:50 AM #20901
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
;
-
October 4, 2008 at 6:07 AM #20902
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.
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.