Explore the capabilities of BizTalk Server 2006 R2 using our interactive capabilities reader

I’m happy to announce that the new BizTalk interactive capabilities reader has been published to the BizTalk Website.


This is a navigation control based on Silverlight technology, which ties up the BizTalk capabilities poster with the capabilities guide. Both published separately here.


It lets you navigate the capabilities poster image and and drill-down to specific bullet by bringing up the BizTalk capabilities guide to provides a brief paragraph on that particular capability. You can use hyperlinks at the end of the paragraph to get more details from the BizTalk documentation on MSDN site. 


Our hope is that this will help in establishing a common taxonomy of BizTalk capabilities accross the community of Developers and IT Pros and will raise BizTalk reviewer’s awareness of “what’s included the box”. Even experienced developers might find it usefull in exploring new territories and learning about those aspects of BizTalk that they might have not been exposed to yet.


So go ahead give it a try and let us know what you think…


Regards,


Ofer

MVP Shenanigans

I’m apparently being subjected to some new MVP hazing.  I received my “welcome” kit in the mail … but it was for some MOM MVP!  Then poor Tim received my kit in the mail.  This was after my online profile got mixed up for a few days.  I’m worried that the next MVP box I […]

T-SQL – Passthrough query to a linked server using sp_executesql instead of OPENQUERY

T-SQL – Passthrough query to a linked server using sp_executesql instead of OPENQUERY

If you’ve ever tried to use OPENQUERY to perform a passthrough query in SQL Server to a linked server, you have probably come across the limitations of this function.  It is VERY clunky if you are trying to pass variables or to get return parameters, etc:


Have a look at this article for some examples:


http://support.microsoft.com/kb/314520


A better method is described at the bottom of the article, which is to use sp_executesql.  This is really important if you need to assign values to a variable and then use that variable in the local server context.  Since there are no built-in global variables in T-SQL you would need to create a temp table and really hack a solution.  sp_executesql gives a much tidier method:


DECLARE @RoomDesc varchar(100)
EXEC linkedserver.master.dbo.sp_executesql
     N’SELECT @RoomDesc = eqnum
    FROM maxprod.dbo.equipmentspec
    WHERE orgid = ”XXX”
    AND siteid = ”YYY”
    AND alnvalue = ”Y”
    AND eqnum = @RoomKey’,
     N’@RoomDesc VARCHAR(100) OUTPUT, @RoomKey INT’,
     @RoomDesc OUTPUT,
     @RoomKey



UPDATE t
SET RoomID = @RoomKey,
RoomName = @RoomDesc
FROM mylocaltable t
WHERE t.EmployeeNo = @EmployeeNo

Back in the Consultant Ranks – Stargate Group Launches Professional Services

Some people said to me that I would miss the consulting work, well now I can have the best of both worlds, Stargate Group has launched Stargate Global Consulting and I will be splitting my time between being Systems Integration Manager and Principal Consultant – Stargate Group

Initial I will be concentrating on BizTalk Consulting and Training, we have launched a “BizTalk Ready” Developer Training course and will be running our first course at the end of February, see our website for details.

I will also be holding a Melbourne BizTalk User Group meeting on the 5th of February at the Stargate Office at 600 Victoria Street, Richmond, details will be on the http://melbiz.org site shortly.

Using the ESB Guidance – Installation Process and Checklists

Many people are eager to get their hands on the new Microsoft ESB Guidance for BizTalk and to start exploring all of the great stuff it contains. However, we’re seeing that a lot of people are struggling with the installation process. Therefore, I thought I’d put together some documentation on the process I followed and I also figured that it would be useful to create some simple checklists that outline all of the tasks, actions and software you need to complete. 


Based on my experiences (and backed up by my college Jim Bowyer’s experiences) most of your time will be spent installing the prerequisites that the ESB guidance requires. The guidance does include some fairly comprehensive help files that do outline all of the service packs, hot fixes etc that you need, however I’ve found that most people rush through this section a bit and miss one of two of the required components or required tasks. I myself spent several hours trying to debug the sample applications only to realize that I had missed one key hot fix and one key step in the configuration process. My strongest recommendation is to really take your time when setting up your environment and make sure you’ve got everything install and configured properly before you try and install the ESB guidance. A little care taken at early will save you massive amount of time later when you’re trying to debug malfunctioning components and sample applications.


After running through this process a couple of times, I’d estimate that I could do a complete installation in a little less than %u00bd a day. It took me almost two days the first time I did this due to fact that I rushed through the process and missing a couple of steps. The %u00bd day estimate is also based on the fact that I have a base Virtual PC image that I can start from. Without this image (I.e. if you’re building a machine from the O/S up), you’ll obviously need more time (perhaps even up to 2 days). Finally, please note documentation is not my day job; these are merely supplementary notes to help folks get started with the ESB Guidance. I hope you find this valuable and I welcome your feedback.


I’ve attached a PDF document containing the process overview and checklists.


Cheers and keep on BizTalking..

Follow-up to my MSDN Channel9 Geekspeak: creating a high-level API around BAM

As I posted here, I had the honor of doing an MSDN Geekspeak last month with Lynn Langit and Glen Gordon. It was a lot of fun, a very casual conversation, covering two of my favorite areas of sub-specialization: BizTalk BAM, and ESB.

The recording is now available at http://channel9.msdn.com/ShowPost.aspx?PostID=369700.

As a follow-up, to that presentation, among other things I showed a higher level API I had created over the BAM API. One of the audience members asked if I could publish it, so…. here you go!

Please note that I am *not* trying to re-create a SOA Software or AmberPoint products. Those products both offer a huge powerful toolkit that any enterprise engaged in service adoption should be aware of, and should explore. However, there are times when just simple metrics tracking is enough, or, perhaps you want to surface some real-time data about a subset of the services in your enterprise. If that’s the case, then the API presented here is a perfectly viable option.

The API is, as you can see, really simple, it just serves as a layer of abstraction that makes it easier for service developers to embed trackpoints in their code (without putting in their own BAM API calls, which requires some knowledge of he underlying activity definition). However, you need to ask yourself if that’s what you really want to do. For instance, if you’re using WCF, you could use BizTalk Server 2006 R2’s WCF interceptors instead, which would allow you to track services by annotating the channel. Changes to the tracking strategy would mean configuration changes, not code changes and redeployments. By the same token, if you’re capturing metrics from BizTalk orchestration, putting in API calls is generally not a good thing as it means that should anything change (such as the data you want to track), you will have to revisit each orchestration that calls the API make a code change. If your data originates in an orchestration, it would be preferable to use the Tracking Profile Editor to create the link between the logical tracking profile and the orchestration implementing the service. This way you get “touch-free” tracking, and can change the tracking without code changes. That’s not a generic statement though, there are certainly times when it’s both appropriate and required that you call the BAM API from inside an orchestration. Clear enough? 🙂

The BAM APIs are in the Microsoft.BizTalk.Bam.EventObservation DLLS.

I have provided three methods:

  • TrackServiceStart
  • TrackServiceEnd
  • TrackServiceException

In order for this to work, we need to correlate a service end to a corresponding service start. In order to do that, the TrackServiceStart method returns a GUID that represent the “token” for this instance of service tracking. The subsequent TrackServiceEnd and TrackServiceException methods will present this token so we know what to update.

The TrackServiceStart method is overloaded:

Once a service has started, it SHOULD either end well, or throw an exception (and it it doesn’t end at all, then you need to schedule cleanup jobs that will remove old incomplete instances):

I hope this post helps you get more out of your BAM.

Technorati Tags: BizTalk,ESB,SOA,BAM

Where have all the EDI Bloggers gone?

My apologies for going dark. No valid excuses so I won’t waste the bits.

Hopefully, you have all discovered Mohsin’s blog by now. He has been diligently picking up the slack while I have been dormant. Mohsin has a lot of terrific posts on various aspects of EDI in R2.

I’m writing this post using Windows Live Writer. Hopefully this new tool will remove one of my lame excuses for not posting more frequently, but I can’t promise anything. You know what they say, "a fool with a tool …

Further BizTalk & MSDTC Issues

I encountered yet another MSDTC issue when talking to a remote SQL Server database following a BizTalk 2006 development environment upgrade from Windows Server 2003 Ent. Ed. to Service Pack 1.
The usual ‘Mutual authentication required’ / ‘No Authentication Required’ problem reared its head, and although this needed to be resolved, I was still receiving the […]

Programmatically Enable or Disable Receive Locations

I have need for this occasionally so I thought I would publish the code that I have written.

namespace StottIS.ChangeConfigration { public enum Active { Start, Stop } public class Adapter { public static void RecieveLocationStateChange(string ReceivePort, string ReceiveLocation, Active ActiveFlag) { BtsCatalogExplorer root = new BtsCatalogExplorer(); try { root.ConnectionString = "Server=.;Initial Catalog=BizTalkMgmtDb;Integrated Security=SSPI;"; //Enumerate the receive locations in each of the receive ports. foreach (ReceivePort receivePort in root.ReceivePorts) { if (receivePort.Name == ReceivePort) { foreach (ReceiveLocation location in receivePort.ReceiveLocations) if (location.Name == ReceiveLocation) { switch (ActiveFlag) { case Active.Start: location.Enable = true; break; case Active.Stop: location.Enable = false; break; default: location.Enable = true; break; } } } } root.SaveChanges(); } catch (Exception e)//If it fails, roll-back all changes. { throw e; root.DiscardChanges(); } } }

In an orchestration Expression Shape, or in your code outside of BizTalk you simply call this code:

StottIS.ChangeConfigration.Adapter.RecieveLocationStateChange("Password Reset","Password Pickup",StottIS.ChangeConfigration.Active.Stop);