Integration Experts – Dipesh Avlani

BizTalk Server, WCF, WF and Cloud computing…

Archive for the ‘BizTalk 2006/2009’ Category

All about BizTalk 2009

BAMAlerts – The activation state cache could not be updated.

Posted by DipeshA on December 18, 2012

If you have log shipped or detached/attached the BAMAlerts databases, you will have issues starting the notification service on the BizTalk server for BAM alerts. The reason for this, when these databases are restored, the the ‘Cross-Database Ownership Chaining’ option on the BAMAlertsApplication and BAMAlertsNSMain databases is disabled and greyed out. Greyed out because it can only be enabled via a script.

cross_chaining

To enable these options, run the following command (you need to be sys-admin):

–set chaining for a database

alter database BAMAlertsApplication set DB_CHAINING ON

GO

alter database BAMAlertsNSMain set DB_CHAINING ON

GO

—-

Once done, you should be able to start the BAM alerts notification service on the BizTalk Server.

Posted in BAM, BizTalk 2006/2009, BizTalk 2010 R2, BizTalk 2013, General | Tagged: , , , , | Leave a Comment »

Determining Process IDs of multiple BizTalk Host Instances

Posted by DipeshA on September 21, 2012

For debugging, it is neccessary to attach the BizTalk host instance process to Visual Studio. However, if you have multple host instances, you cant tell which one is which.

I have found a PS script which gives you the process Ids of multiple host instances.
32Bit Hosts:
TASKLIST /FI “USERNAME ne NT AUTHORITYSYSTEM” /FI “IMAGENAME eq BTSNTSvc.exe” /SVC

64Bit Hosts:
TASKLIST /FI “USERNAME ne NT AUTHORITYSYSTEM” /FI “IMAGENAME eq BTSNTSvc64.exe” /SVC

Posted in BizTalk 2006/2009, BizTalk 2010, BizTalk 2010 R2 | Tagged: , | 3 Comments »

SignalR & BizTalk

Posted by DipeshA on July 26, 2012

For those who have never heard about SignalR, it is an async .net library for building real-time web applications. This sounds so interesting that it can actually open another dimension for applications requiring realtime updates via BizTalk.

SignalR helps pushing data from the server to the client (not just browser clients). SignalR makes it dead easy and handles all the heavy lifting for you.

There is a very interesting article by Kent Weare which talks about SignalR and how it can be used with BizTalk.

http://kentweare.blogspot.com.au/2012/07/part-1-biztalk-signalr.html

Posted in BizTalk 2006/2009, General | Tagged: , | Leave a Comment »

Retry pattern and Suspend shape – the gotchas!

Posted by DipeshA on June 28, 2012

I have just come out a frustration moment with BizTalk where it was behaving differently when compared to a similar environment. I have a retry pattern in one of my orchestrations and a suspend shape within the catch block. See screenshot below:

One would hope that when the administrator resubmits the suspended message, it would continue from the point it left of (that is continue in the loop). However, what I saw was, the orchestration would go into the “active” state indefinately.  Also, when trying to terminate this active instance, the terminate job would show as pending and the service wouldnt terminate unless the host was restarted.

Further investigation revealed that the suspended orchestration has no related message (or context). See screenshot below.

To eliminate any false positives, I deployed the same app on our test environment and saw that there was a message linked to the suspended orchestration.

This is where I was stumped!

After hours of pondering, I thought of the famous MBV! I ran some analysis via the MBV and I found this in the report:

The value “Missing Restart Msg in the Spool table…” was the light at the end of the tunnel. I quickly ran the Terminator tool to clean the messagebox.

Once done, I ran the MBV analysis again and all critical warnings were gone in relation to “Control Messages”.

I then tried my test again and saw the messages were now linked to suspended orchestrations….

On resubmitting, I would see the message continue from where it left off…

Hope this helps someone having similar issues.

Posted in BizTalk 2006/2009, BizTalk 2010, General | Tagged: , , | Leave a Comment »

Tracing and Tracking ESB events

Posted by DipeshA on May 28, 2012

Many a times one may feel the need to trace ESB events when using itineraries. This will enable you to see how a message is getting processed by the ESB itinerary resolver and if something is going wrong there. The process of enabling this switch is quite simple and it involves the following:

Tracing

1) Open the BizTalk Configuration file, ie BTSNTSVC.exe.config

2) Add the following section (if one does not exist)  and save the file:

<system.diagnostics>

<sources>

<source name=”BizTalk ESB Toolkit 2.0″ />

</sources>

<switches>

<add name=”BizTalkESBToolkit20″ value=”4″ />

</switches>

<trace autoflush=”true” indentsize=”4″ >

<listeners >

<add name=”myListener”   type=”System.Diagnostics.EventLogTraceListener” initializeData=”BizTalk ESB Toolkit 2.0″ />

</listeners>

</trace>

</system.diagnostics>

Note: 
Add a Trace listener. If you don't already have a trace listener configured, add 1 of the many Trace listeners that come out of the box with the .Net framework: (Default, EventLog, TextWriter, Console, Text, etc.)
When using the EventLogTraceListener, the initializeData attribute must be set to the source of the Tracing Event. 
In this case it is the "BizTalk ESB Toolkit 2.0" source.

3) Restart the BizTalk Host Instance.

4) You will now see information and error events in the event viewer. Also if you have debugview running, you will see code traces there.

Tracking

After enabling tracing, you might still feel the need for tracking. That is, what went where? Every Itinerary Service has a property called ‘Tracking Enabled’ which you’ve got to set it to ‘True’ during the design phase. This sets the stage for tracking an Itinerary Service. Set this property for every single service in an Itinerary as this is false by default. Only those services whose ‘Tracking Enabled’ property is set to true will show up in the database.

Ok, tracking is set to true and my itinerary is deployed. Where do I see this tracing information?

When a service in an itinerary is set for tracking, it is recorded in the BAMPrimaryImport database in the table bam_ItineraryServiceActivity_Completed. the column itineraryBeginTime should be used to sort the results by datetime.

This table gives a snapshot view of the trajectory of the message and if each stage in its path was completed or pending.

Posted in BizTalk 2006/2009, ESB Toolkit, General | Tagged: , , , , | Leave a Comment »

WCF-SQL Adapter and permissions

Posted by DipeshA on April 16, 2012

If you are using a WCF SQL adapter in your solution, it is imperitive to set permissions on the stored procedures you call from within BizTalk. However, if you havent set permissions, the error message can be a little misleading.

The adapter failed to transmit message going to send port “WcfSendPort_SqlAdapterBinding_TypedProcedures_MyDB” with URL “mssql://MYSRVSQ01//MyDB?”. It will be retransmitted after the retry interval specified for this Send Port. Details:”Microsoft.ServiceModel.Channels.Common.MetadataException: Object [dbo].[uspInsertRecords] of type StoredProcedure does not exist

The above message can be quite confusing especially when the stored procedure does exist in your database. The above basically means the BT host account does not have execute permissions on the stored procedure being called. You need to restart the BT host instance after setting permissions.

Now, lets see what happens when I have a working solution (my permissions are set) and I revoke the execute permission on the same stored proc (remember, I havent restarted the BT host after revoking the permission). I now see this error message:

The adapter failed to transmit message going to send port “WcfSendPort_SqlAdapterBinding_TypedProcedures_MyDB” with URL “mssql://MYSRVSQ01//MyDB?”. It will be retransmitted after the retry interval specified for this Send Port. Details:”System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object ‘uspInsertRecords’, database ‘MyDB’, schema ‘dbo’.

This seems to be a much more clear message, isint it? However, if you restart the BT host and try processing your file again, you will see the first error.

Posted in BizTalk 2006/2009, BizTalk 2010 | Tagged: , , | 1 Comment »

BizTalk with ReST

Posted by DipeshA on March 9, 2012

There is a great article posted by Microsoft which explains how BizTalk can be configured to call a ReST service. You can find it here.

Althought this article is based on BizTalk 2010 (.net 4.0), I have tested this with BizTalk 2009 (.net 3.5) and it works.

Check it out!

Posted in BizTalk 2006/2009, BizTalk 2010, BizTalk 2010 R2, ReST | Leave a Comment »

BizTalk – Overlapped I/O operation is in progress

Posted by DipeshA on March 1, 2012

While configuring BizTalk features (BAM Tools or Sharepoint Adapter), you may have issues getting the cofiguration process to succeed with the error below:

“Overlapped I/O operation is in progress”

Certain blogs suggest that registry changes be made to force it to work. This is a bit risky once it comes to prod environments. The best approach to fix such issues is to repair the BizTalk installation and try configuring BizTalk again.

Posted in BizTalk 2006/2009, BizTalk 2010 | Leave a Comment »

Scheduling BAM Packages – failure in ‘Set global connection string variables’

Posted by DipeshA on February 22, 2012

I recently hit an issue while configuring a sql job to process my BAM cubes by running the BAM_AN_* packages with the following error:
Code: 0×00000000
Source: Set global connection string variables
Description: Object reference not set to an instance of an object.

I later found that this was due to the user under which the SQL Server Agent Service runs not having enough permissions on SQL Server. I changed the user to a sql server service account and I no longer got this error while running the sql job. Alternatively, you can also run this service under the network service account if your BAM databases are on a different server.

Posted in BAM, BizTalk 2006/2009, BizTalk 2010 | Leave a Comment »

“the binary code for the script is not found…”

Posted by DipeshA on February 7, 2012

When you deploy a BAM activity, it creates at least one SSIS package for the activity which will create partition tables and move any activity instances within the archive window to the BAMArchive database.  If you’ve created any BAM views which create an OLAP cube, an SSIS package will also be created to move the data between the relational tables and the cube as well.  These SSIS packages are stored on the SQL server, in the MSDB database instance on the default server instance.

So SSIS needs to be installed on the SQL Server not the BizTalk server.  But what does need to be installed on the BizTalk server? See below…

You need to install:
1) Client Tools SDK
2) Client Tools Backwards Compatibility (this is critical).
+ the management tools as shown above.

I recently hit this issue while trying to run the BAM_AN_ SSIS package in SQL Server 2008 in order to load the activity data to the cube and got “the binary code for the script is not found”. What this means is the SSIS packages created by the BM utility has not been compiled. If you try and open the resulting dtsx package in Visual Studio, you are likely to see a dialog indicating that the package is corrupt. Lastly I had to  undeploy the existing BAM view and redeploy and the error went away!

Below are the screens I saw before and after installing the missing components.

Before:

After:

Hope it helps someone!

Posted in BAM, BizTalk 2006/2009, BizTalk 2010, General | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.