BizTalk BAM Archiving

Posted By: Bill Chesnut

There have been several previous blog posts by several different authors about BAM Archiving, I decided that it would be good if all of the information was in one article, so here I go.

To start off I have used information from Richard Seroter’s Blog post BizTalk BAM Data Archiving Explained which gives a good description of the BAM Archiving structure. What I found though was there was not any really good material on what I need to do to make the BAM archiving happen.

I started investigating and found that what I had thought was automatically happening, the running of the BAM SSIS package was not automatically happening, the only part of the BAM processing that happens automatically is the Real Time Aggregation (if you have SQL Enterprise Edition).

So now I need to figure out what I need to do to get BAM Archiving working on my current clients site. I found that I needed to go into SSIS and look at all the BAM SSIS packages that were deployed and then setup a SQL Agent job to run these, but thinking more about BAM, I was looking for a way to not have to create or update a SQL Agent job every time that a new BAM Activity was added or removed.

Below is a look at the BAM SSIS packages that are deployed in a typical BizTalk installation with EDI and the ESB Toolkit.

I also found that a list all the BAM Activities are in the BAMPrimaryImport Database

The bam_Metadata_Activities table also include the OnlineWindowTimeUnit and OnlineWindowTimeLength and if Archiving was enabled

So I had an idea, what about another SSIS package that reads the bam_Metadata_Activities table and then executes all the SSIS packages for the deployed BAM Activities, this way only the currently deployed BAM Activities packages would be run.

I created an SSIS package that used the Execute SL Task to return a row set with the name of all the BAM SSIS packages, it then passes the row set to a Foreach Loop that runs an Execute Package Task for each SSIS package found.

I then created an deployment for the SSIS package and deployed it to the BizTalk SQL Server

Once the package is deployed in SSIS you can right click on the package and run package or you can create a SQL Agent job to execute the SSIS on a regular schedule, that is what I choose to do

Create the Job and then add a step that executes the SSIS package

If necessary you can update the location where the BAMPrimaryImport and SSIS packages are stored

Then Create a schedule, I have chosen to run the archive once a week at 2:00am Sunday morning

You can then test the job, but right clicking on the Job and start job at step and wait for it to complete

Once the job has completed you can look at the contents of the BAMPrimaryImport table bam_Metadata_Partitions and see which tables have data to be archived, but the archive process will not start until the CreationTime of the row in the bam_Metadata_Partitions is older than the OnlineWindowTimeLength, so in my example archiving will not start until 27/02/2013, so I cannot stress enough how important it is to setup archiving when you install BizTalk.

This should be all the information that you need to setup BAM archiving.

You can download my SSIS package from http://www.biztalkbill.comhttp://biztalkbill.com/Default.aspx?id=15&tabid=60

More …

Multi-Part Message Attachments Zipper Pipeline Component for BizTalk 2006/2009 is now available

Multi-Part Message Attachments Zipper Pipeline Component for BizTalk 2006/2009 is now available

Two months ago I published on CodePlex and at Microsoft Code Gallery the pipeline component “Multi-part Message Attachments Zipper Pipeline Component” for BizTalk Server2010. This time I decided to make available a version of this component for previous version of BizTalk Server. The BizTalk Multi-Part Message Attachments Zipper is a pipeline component for BizTalk Server […]
Blog Post by: Sandro Pereira

Cloud-Burst 2012-Windows Azure Developer Conference in Sweden

The Sweden Windows Azure Group (SWAG) will running “Cloud-Burst 2012”, a two-day Windows Azure conference hosted at the Microsoft offices in Akalla, near Stockholm on the 27th and 28th September, with an Azure Hands-on Labs Day at AddSkills on the 29th September. The event is free to attend, and will be featuring presentations on the latest Azure technologies from Microsoft MVPs and evangelists. The following presentations will be delivered on the Thursday (27th) and Friday (29th):

%u00b7 Connecting Devices to Windows Azure – Windows Azure Technical Evangelist Brady Gaster

%u00b7 Grid Computing with 256 Windows Azure Worker Roles – Connected System Developer MVP Alan Smith

%u00b7 ’Warts and all’. The truth about Windows Azure development – BizTalk MVP Charles Young

%u00b7 Using Azure to Integrate Applications – BizTalk MVP Charles Young

%u00b7 Riding the Windows Azure Service Bus: Cross-’Anything’ Messaging – Windows Azure MVP & Regional Director Christian Weyer

%u00b7 Windows Azure, Identity & Access – and you – Developer Security MVP Dominick Baier

%u00b7 Brewing Beer with Windows Azure – Windows Azure MVP Maarten Balliauw

%u00b7 Architectural patterns for the cloud – Windows Azure MVP Maarten Balliauw

%u00b7 Windows Azure Web Sites and the Power of Continuous Delivery – Windows Azure MVP Magnus M%u00e5rtensson

%u00b7 Advanced SQL Azure – Analyze and Optimize Performance – Windows Azure MVP Nuno Godinho

%u00b7 Architect your SQL Azure Databases – Windows Azure MVP Nuno Godinho

There will be a chance to get your hands on the latest Azure bits and an Azure trial account at the Hands-on Labs Day on Saturday (29th) with Brady Gaster, Magnus M%u00e5rtensson and Alan Smith there to provide guidance, and some informal and entertaining presentations.

Attendance for the conference and Hands-on Labs Day is free, but please only register if you can make it, (and cancel if you cannot).

Cloud-Burst 2012 event details and registration is here: http://www.azureug.se/CloudBurst2012/

Registration for Sweden Windows Azure Group Stockholm is here: swagmembership.eventbrite.com

The event has been made possible by kind contributions from our sponsors, Knowit, AddSkills and Microsoft Sweden.

Monitor your BizTalk environment using PowerShell – Disk Space Monitoring

Monitor your BizTalk environment using PowerShell – Disk Space Monitoring

One of the principal needs for BizTalk Administrators is the ability to monitor the health of BizTalk environments and react promptly to possible problems, you can accomplished this by using certain tools such as: BizTalk Administration Console: is a Microsoft Management Console (MMC) that you can use to manage and monitor BizTalk Server, and that […]
Blog Post by: Sandro Pereira

My upcoming talk at BUGS

This coming Tuesday I will make my debut as a speaker at BUGS (BizTalk User Group Sweden) and some wanted to know what I will try to cover in my Tips and Tricks session.

Here are some:

  • Trace och Trace using BAM-tracking
  • Recoverable interchange
  • Ordered delivery and WS-anrop
  • “Copy name” in map
  • Separated list in a map
  • Datatypes and imports in schemas
  • ”Copy” in filemask
  • Debatching using xml
  • Rename files while reading
  • Autentication-tab in the FILE-adapter
  • Negative service Window
  • Debugging pipeline components
  • Empty rows at the end of flatfiles
  • Using the subscriptions-query usefully

There will be more but these are some at least. Hope to see you there.

Blog Post by: Mikael Sand

Testing ESB Toolkit Business Rules

Introduction

In the ESB toolkit for BizTalk Business Rules can be used in the following scenarios:

  • Dynamic routing
    • Dynamically routes a message, based on the content of a known message type
  • Dynamic transformation
    • Dynamically transform a message from one type to another, based on the content of a known message type
  • Specifying Itineraries
    • Select an itinerary based on the content of a received message

It is not very difficult to create business rules policies in the Business Rule Composer that can be used for one of these scenarios but is not so easy to test the created policies because it’s not documented how to do it. You have to find out which specific classes, properties and methods are used and in which DLL libraries they are located. So I made %u200b%u200ba sample tool with which these ESB Toolkit classes can be tested! ( –;

 

Description

In the sample project is a Windows Forms Application located that calls the Business Rules Engine to test the business rules.

With the sample tool policies can be tested that have one of the following vocabularies from the ESB toolkit:

  • ESB.EndPointInfo
    • Set End Point Outbound Transport Location
  • ESB.TransformInfo
    • Set Transform Transform Type
  • ESB.Itinerary
    • Set Itinerary Name

 

Dynamic routing

Create a business rule in the Business Rule Composer that dynamically routes a message, based on the content of a known message type.

This example is based on: How to Implement Content-Based Routing Using a Business Rules Policy for a Known Message Type
See also:
http://msdn.microsoft.com/en-us/library/ff699643

 

 

How to test Content-Based Routing

Specify the following properties in the sample tool to test Content-Based Routing :

  • ESB Toolkit Fact: ESB.EndPointInfo
  • Policy Name where the specific business rules are located
  • Document Type of the message

 

Dynamic transformation

Create a business rule in the Business Rule Composer that dynamically transforms a message from one type to another, based on the content of a known message type

 

 

How to test Dynamic transformation

Specify the following properties in the sample tool to test  dynamic transformation:

  • ESB Toolkit Fact: ESB.TransformInfo
  • Policy Name where the specific business rules are located
  • Document Type of the message

 

Specifying Itineraries

Create a business rule in the Business Rule Composer That selects an itinerary

This example is based on: How to Select an Itinerary Using a Business Rules Policy
See also:
http://msdn.microsoft.com/en-us/library/ff699745

 

How to test Specifying an itinerary

Specify the following properties in the sample tool to test  selecting an itinerary:

  • ESB Toolkit Fact: ESB.Itinerary
  • Policy Name where the specific business rules are located
  • Document Type of the message

 

How the sample works

In the sample .NET application is a reference added to the Microsoft.RuleEngine.dll assembly, which contains the classes required to call the business rules engine. This may be in either $\Program Files\Common Files\Microsoft BizTalk or $\Program Files\Microsoft BizTalk Server 2010\.
Also are the necessary policy and fact objects created. Now the the business rule policy can be executed, as shown in the following listing:

 

Download

You can download the sample tool with the source code here:

http://code.msdn.microsoft.com/Testing-Business-Rules-in-28396b66