BizTalk - Removing BAM Activities and Views using bm.exe

Posted by Stuart Brierley on Geeks with Blogs See other posts from Geeks with Blogs or by Stuart Brierley
Published on Wed, 16 Oct 2013 07:40:02 GMT Indexed on 2013/10/17 16:01 UTC
Read the original article Hit count: 469

Filed under:

Originally posted on: http://geekswithblogs.net/StuartBrierley/archive/2013/10/16/biztalk---removing-bam-activities-and-views-using-bm.exe.aspx

On the project I am currently working on, we are making quite extensive use of BAM within our growing number of BizTalk applications, all of which are being deployed and undeployed using the excellent Deployment Framework for BizTalk 5.0.

Recently I had an issue where problems on the build server had left the target development servers in a state where the BAM activities and views for a particular application were not being removed by the undeploy process and unfortunately the definition in the solution had changed meaning that I could not easily recreate the file from source control. 

To get around this I used the bm.exe application from the command line to manually remove the problem BAM artifacts - bm.exe can be found at the following path:

C:\Program Files (x86)\Microsoft BizTalk Server 2010\TrackingC:\Program Files (x86)\Microsoft BizTalk Server 2010\Tracking

Step1 :Get the BAM Definition File

Run the following command to get the BAm definition file, containing the details of all the activities, views and alerts:

bm.exe get-defxml -FileName:{Path and File Name Here}.xml

Step 2: Remove the BAM Artifacts

At this stage I chose to manually remove each of my problem BAM activities and views using seperate command line calls.  By looking in the definition file I could see the names of the activities and views that I wanted to remove and then use the following commands to remove first the views and then the activities:

bm.exe remove-view -name:{viewname}

bm.exe remove-activity -name:{activityname}

© Geeks with Blogs or respective owner