Performance Point – the Good and the Bad – Part 1

This posting presumes the reader has at least a basic understanding of what Microsoft’s Performance Point (PP) offering is, at least at the level of wanting to assess whether it is appropriate for your requirements. Basic familiarity with Microsoft’s Analysis Services is also required to get the most out of the observations I provide. If […]
Blog Post by: Mark Frawley

Configure the Exception Management Framework in the ESB toolkit to route fault messages to SQL Azure

The ESB Exception Management Framework provides the ESB Exception Off-ramp that subscribes to all ESB-generated fault messages, but also to exceptions generated by the BizTalk Server failed message routing mechanism. The component routes fault messages to the ESB exception management database, but is it also possible to configure it to route to SQL Azure?
The Exception Management Framework in BizTalk 2013 still uses the SQL adapter to send messages to the EsbExceptionDb database. The SQL adapter runs distributed transactions and uses the Data Transaction Coordinator (DTC). In Azure you can’t use DTC so let’s see what we have to modify to make it work.

 

Steps

The following tasks must be performed to route fault messages to SQL Azure :

  • Create a new SQL Azure Database
  • Copy the necessary tables and procedures from the ESB exception management database to the SQL Azure database
  • Create a new map in Visual Studio to map to the stored procedure in the SQL Azure database
  • Modify the ESB Exception Off-ramp in BizTalk to use the WCF-SQL adapter and the new map.
 
Create a new SQL Azure Database
Open the Windows Azure Management Portal in the browser.
Location: https://manage.windowsazure.com/
 
To create a database, click SQL DATABASES in the left-hand navigation pane and click on CREATE A SQL DATABASE.
 
Enter Login Name, Password and the location of the Data Center.
 
Enter Database Name, Maximum Database Size, Collation and the name of the Subscription.
 
 
Copy the necessary tables and procedures to the SQL Azure database
In SQL Server Management Studio, connect to the EsbExceptionDb database from BizTalk.
 
Right-click on the Fault table and script the CREATE TABLE statement to a File or a New Query Editor Window.
 
Also script the stored procedure: usp_insert_Fault.
 
Note
The Exception Management Framework also uses other tables and stored procedures but in this example we are only using the main table. *(See Conclusion)
 
In SQL Server Management Studio connect to the newly created SQL Azure database.
 
Open a New Query Window and use the generated scripts to create the Fault table and the usp_insert_Fault stored procedure on the SQL Azure database.
 
Note
Not all keywords are supported in SQL Azure. Remove the ON [PRIMARY] keywords from the CREATE TABLE statement otherwise you will get an error like:
‘Filegroup reference and partitioning scheme’ is not supported in this version of SQL Server.
 
 
Create a new map in Visual Studio to map to the stored procedure in the SQL Azure database
The map in the ESBFaultProcessor pipeline in the ESB Exception Off-ramp is for the SQL adapter so you have to create a new map for the WCF-SQL adapter.
 
In Visual Studio create a new BizTalk project
 
To create a .XSD schema for the usp_insert_Fault stored procedure:
In the Solution Explorer right-click the BizTalk project and add a generated item. Choose: Consume Adapter Service.
 
Connect to the SQL Azure database and select the usp_insert_Fault stored procedure. Click on OK.
 
The ESBFaultProcessor pipeline in the ESB Exception Off-ramp creates a FaultMessage. The FaultMessage schema is located in the Microsoft.Practices.ESB.ExceptionHandling.Schemas.Reporting.dll library. Create a reference to the library to use the schema.
 
Create a new map and connect the FaultMessage schema to the usp_insert_Fault schema.
 
Note

I’ve got the following exception when I close the map in Visual Studio 2012. A Beta bug?!

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
Stack:
at Microsoft.BizTalk.Mapper.MapperVsPackage.ConnecterShape.ConnecterPosition(System.Windows.Forms.TreeNode, Microsoft.BizTalk.Drawing.DrawingControl, Int32, Int32)

 
 
Modify the ESB Exception Off-ramp in BizTalk to use the WCF-SQL adapter and the new map.
Deploy the BizTalk project with the created usp_insert_Fault schema and map to the Microsoft.Practices.ESB application.
 
Go to the ALL.Exceptions Send Port in the Microsoft.Practices.ESB application. Right-click the send port and choose: Properties…
 
Change the transport Type to WCF-SQL and click on Configure..
 
Change the URI to the SQL Azure database and set the Action.
In the binding page set UseAmbientTransaction = false.
On the Credentials tab set the username and Password.
Click on OK.
 
In the Send Pipeline properties set the new map
Also disable the ESB BAM tracker *(see Conclusion)
Click on OK.
 
Now the ESB Exception Off-ramp is configured to send messages to SQL Azure!
 

 

Test

Enable routing of failed messages on the Send Ports in a BizTalk application to capture BizTalk errors.

View the BizTalk errors in the SQL Server Management Studio
 

 

Conclusion

It is possible to modify the ESB Exception Off-ramp and send error messages from BizTalk to SQL Azure. However in this example I’m only using the main Fault table. I didn’t try it with multiple tables but it should also be possible. Furthermore I disabled BAM in the ESB Exception Off-ramp. That’s also a nice challenge to get it working.
In the next post I will try to create a portal or a website so that a user can view the faults without de need of SQL Server Management Studio.

You can download the sample schema and map here: http://www.ithero.nl/downloads/itHero.ESB.ExceptionHandling.zip
 

Stay tuned!!

(Message 4035) BACKUP LOG cannot be performed because there is no current database backup

(Message 4035) BACKUP LOG cannot be performed because there is no current database backup

Hi everyone, last time I got a disk space issue, after purging some data and backup, I tried to run the biztalk jobs. But the DTA backup job failed with this error Executed as user: xxx. Processed 3233 pages for database ‘BizTalkDTADb’, file ‘BizTalkDTADb_log’ on file 1. [SQLSTATE 01000] (Message 4035) BACKUP LOG successfully processed […]
Blog Post by: Jeremy Ronk

BizTalk Mapper Patterns: How to map values from a repeating node into a single node using conditions

BizTalk Mapper Patterns: How to map values from a repeating node into a single node using conditions

Well, I decided to take a few minutes of my vacation to play a little with … BizTalk, renew some knowledge, answer a few emails and maybe try to answer some questions on the forums. This exercise (or pattern) is actually from a question that I found on the forums: Reg BizTalk Mapping, which I […]
Blog Post by: Sandro Pereira

BizTalk Management and MessageBox Databases out of sync – The service action could not be performed because the service is not registered

BizTalk Management and MessageBox Databases out of sync – The service action could not be performed because the service is not registered

I was recently asked to help out at a site which was having a problem with one of their production deployments. Every time they tried to delete their application before importing the new version (which is standard practice at this site) they were getting an error message saying “The service action could not be performed […]
Blog Post by: Johann

BizTalk Summit 2012, Redmond-Experience

If you are a BizTalk person, one way or the other you must have come across BizTalk Summit 2012, held at Microsoft campus at Redmond on Dec 10th/11th. It was an invitation only event with few customers, partners, MVP, v-TSP etc. The main objective of the event is to show the roadmap, future direction of […]

The post BizTalk Summit 2012, Redmond–Experience appeared first on BizTalk360 Blog.

Blog Post by: Saravana Kumar

User Profile Synchronization: An error has occurred while accessing the SQL Server database or the SharePoint Server Search service

 
To resolve this error follow these resolution tips:
1. On central admin, go to manage services on server, start and stop the user profile service and user profile synchronization service. This will re-provision the UPS
2. If you havent reset IIS after configuration via AutoSPInstaller, try iisreset and see if that fixes the issue
3. On the Central […]
Blog Post by: kadasani

Curiosities: 12 years of integration – Happy Birthday BizTalk

Curiosities: 12 years of integration – Happy Birthday BizTalk

Some people say that according to Mayan calendar, the Mayan fifth world finished in 1987 and the sixth world starts in 2012, so we are currently “between worlds” and this time is called the “Apocalypse” or revealing. Mayans also say that by in 2012 (again according to some peoples): We will have gone beyond technology […]
Blog Post by: Sandro Pereira