Friday, April 4, 2008

BizTalk Server 2006 (and R2): Set Failed Message Routing

While developing BizTalk projects I frequently end up developing mini-tools to automate small and/or repetitive administration tasks. One of these, which I recently generalized, I use to turn on or off multiple "Enable Failed Message Routing" options.

Here's how you can use it:

TurnFailedMessageRouting * on DbServer - turns on the option in all the send ports and receive locations in all the applications in the configuration database in server DbServer.

TurnFailedMessageRouting MyApp off DbServer - turns off the options in all the send ports/receive locations of application MyApp in the configuration database in server DbServer.

So:

  • The first parameter is mandatory, and can have as value "*" (meaning all the applications) or a single application name
  • The second parameter is mandatory, and can have values "on" or "off"
  • The third parameter is optional, and it is used to specify the name of the server containing BizTalk's configuration database. If this value is omitted, "localhost" is used.

The source code is in the attachment, it's pretty simple, use and change it freely. Most of it uses the BtsCatalogExplorer functionality.

(note: this can be done using script, I just prefer coding in C#).

Download at my SkyDrive: BizTalk2006.TurnFailedMessageRouting.zip

No comments:

Post a Comment