Wednesday, 23 February 2011

How to find the Number of Persistence points used in the BizTalk Application?

Definition of Persistence points and its use can be found every where by googling.

But, how do we measure, the number of persistence points in our application?

It can be done through the Persistence Points Performance Counter in BizTalk Server.

To find this, Click Start -> Search for performance.

Soon you will find “Reliability & Performance Monitor



Alternatively you can find this in Start -> All Programs -> Administrative Tools -> Reliability & Performance Monitor

Open the Performance Monitor and Click on the + Sign. Or right Click & Select Add Counter.



This will open Add Counter Window.

Expand XLANG/s Orchestrations and select Persistence Points.



Finally select your host for which you want to track your Persistence points and Click Add.

Now, run your orchestration and you should be able to see the counter goes up, based on the number of persistence points your application use.

This counter will basically show  you, how many persistance points that the host has created since its previous restart. (Once host instance is restarted, this counter is set to zero)



Incase if you want to reset your Counter, just restart the host instance.
Hope it is helpful.

- Shiv


Web Counters




Monday, 21 February 2011

Debugging Orchestrations in BizTalk 2009 using C# .cs file

An Orchestration *.odx file contains an XML file and code written in a language specific to BizTalk called X#.

You can easily find these, when you right click an orchestration and open it with XML Editor or Notepad.

XML Representation of the Orchestration is used by the Graphical Designer to show the shapes on the screen.

X# code is in turn converted to C# at runtime using XSharp.exe file and this C# assembly will be executed.

This C# file can be found inside <ProjectFolder>\obj\Debug\BizTalk\Xlang\File0.cs once the project is built.

Unlike in earlier versions of BizTalk, only one .cs file will be created irrespective of number of orchestration you have in your project.

This File0.cs file has different sealed internal classes for each of the orchestration in your project.

To debug your orchestration or code written in an expression shape, open this File0.cs and keep a break point. Attach BizTalk Server to the BtsNTSvc Process.

Now you will be able to debug your orchestration using C# Code.

Hope it helps.

-       Shiv

Sunday, 20 February 2011

An alternative to SQL Receive Adapter

Details about SQL Receive Adapter can be found here.

It simply Polls SQL Server DB for data.

Though this is an useful adapter, at times, it increases load on SQL Server with unnecessary calls.

This adapter is not worth using in scenarios where you are not sure of getting data all the times.

In such cases you can go for alternative design, wherein you can get notification to BizTalk Server, whenever new data is available in SQL Server.

This design can be done as follows.

NewData Comes to SQL Server -> Write a trigger that fires upon new data arrives -> Call a .NET function from the trigger -> From the .NET Function, notify BizTalk Server that new data has arrived (Say for eg: Save a dummy file in a folder and let BizTalk be notified on the new data or Call a BizTalk Orchestration Exposed as  a Service etc) -> Have your Logic to Fetch the new Data using an Stored Proc.

Rather than going with the standard polling approach, this new design will help us to use the features available with SQL Server and reduce unnecessay calls to SQL Server.

Hope its helpful.

-Shiv

Wednesday, 16 February 2011

No Views are displayed in BAM Portal!!!!

We may wonder why even after sucessful deployment of BAM activities and views , why views are not getting displayed inside BAM Portal ?

The straight reason is - Lack of permission.

Normally when the user have admin rights on the system the views should be automatically displayed inside the portal.

But sometimes even for the administrator they wont show up.For this,we should add the Views under the logged user account to see the them in the BAM portal.

Inorder to set the permission,open command prompt and go to the path where Views are stored.

Now set the path attribute to "C:\Program Files (x86)\Microsoft BizTalk Server 2009\tracking" and execute the permission command. 

bm add-account -accountname:domain\userid -view:viewname

Now it should show up.

- Shiv