Mohammed Atef’s Technical blog

Monitor BizTalk 2009 Applications

Introduction

I have found question at Microsoft BizTalk Forums about how to retrieve all BizTalk Application with none started status.

Solution

An Expert MVP called Thiago AlmeidaMVP has answered and advice for using BizTalk ExplorerOM assembly. i have used it to create simple windows application that show all BizTalk application with status in DataGridView.

Understand code

Let us see main code used to retrieve BizTalk application and it is status in the below snippet:

   1: BtsCatalogExplorer catalog = new BtsCatalogExplorer();
   2: DataTable apptbl = CreateAppTBL();
   3: //connection string to BizTalk management database
   4: catalog.ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI";
   5: DataRow dr;
   6: foreach (Microsoft.BizTalk.ExplorerOM.Application app in catalog.Applications)
   7: {
   8:     dr = apptbl.NewRow();
   9:     dr["AppName"] = app.Name;
  10:     dr["AppDesc"] = app.Description;
  11:     dr["AppStatus"] = app.Status;          
  12:     apptbl.Rows.Add(dr);
  13: }
  14: return apptbl;

As shown above i am going to retrieve all applications throw BtsCatalogExplorer then use Foreach loop to fetch each application individual and finally fill DataTable with information needed.

now i am going to give you simple description about ConnectionString property found at BtsCatalogExplorer .

ConnectionString : is used for gets or sets the string used to open BizTalk Management database as shown above i have installed BizTalk at local server so i have wrote server=. to point to local server database and BizTalk Database is BizTalkMgmtDbso i have set DataBase with BizTalkMgmtDb value.

you can download full sample from here.

I hope that help.

Advertisements

October 21, 2009 - Posted by | Biztalk | ,

1 Comment »

  1. Thanks for the sample code, it gave me good kickstart.

    How i can get status of hosts instances?

    Comment by spica | October 26, 2011 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: