BAM Management Utility Commands – bm.exe

  • Sandro Pereira
  • Apr 14, 2009
  • 4 min read

You can use the BAM utility to perform the following tasks:

  • Consume BAM definition and BAM configuration XML as input. The BAM definition XML or XLS files define the data to track and aggregate, as well as the business end user’s view on the tracking data. The BAM configuration XML mandates where to deploy the infrastructure, such as the server name, database name, and other database settings.
  • Deploy the runtime infrastructure on the server, including the BAM Primary Import database, the BAM Star Schema database, the BAM Analysis database, and the corresponding Data Transformation Services (DTS) packages. The following items are created during this step:
    • BAM Primary Import database
    • BAM Star Schema database
    • BAM Archive database
    • BAM Analysis database

BAM utility (bm.exe) does many things for you during the deployment of an XML or XLS file, like creating SQL tables, indexes, triggers, views, stored procedures, OLAP cubes, DTS packages, SQL and OLAP security roles, etc.

📝 One-Minute Brief

This post serves as a comprehensive quick-reference guide for the BAM Management Utility (bm.exe). It outlines the essential commands required to deploy, manage, and remove BAM definitions, views, and activities within Microsoft BizTalk Server environments. Perfect for developers and admins who need a syntax refresher without digging through MSDN.

How to use

In a very simple way:

To see the list of all commands, or in other words, the help of the command, you can put:

bm.exe

or

bm.exe help

Note: You have to browse to the following directory: <installation path>\Program Files\Microsoft BizTalk Server %version%\Tracking. ( where’s %version% can be 2006, 2009, 2010…)

— COMMANDS —

help
setup-databases, migrate-sql
get-config, update-config
get-references, enable-reference, disable-reference
deploy-all, update-all, remove-all
get-activities, remove-activity
get-views, remove-view
get-alerts, remove-alerts
get-defxml
get-accounts, add-account, remove-account
get-subscriptions, add-subscription, remove-subscription
enable-alerts, disable-alerts
get-index, create-index, delete-index
get-activitywindow, set-activitywindow, get-rtawindow, set-rtawindow
get-changes
update-livedataworkbook, regenerate-livedataworkbook

To get detailed help for a specific command:

  • bm.exe help -Command:<command> (that there is no space after “-Command:”)

For example:

bm.exe help -Command:get-config

List of Commands

Here is a table with the bm.exe commands in BizTalk Server:

BM utility command
Example
bm.exe setup-databasesbm.exe setup-databases -ConfigFile:BamConfiguration.xml
bm.exe migrate-sqlbm.exe migrate-sql -From:sql2000 -To:sql2005 -NSUser:domainuser1

bm.exe migrate-sql -From:sql2000 -To:sql2005 -Server:MyServer -Database:db1

bm.exe get-configbm.exe get-config -FileName:MyConfig.xml
bm.exe update-configbm.exe update-config -FileName:MyConfig.xml
bm.exe get-referencesbm.exe get-references -Server:MyServer -Database:MyPrimaryImport
bm.exe enable-referencebm.exe enable-reference -TargetServer:MySrv -TargetDatabase:BamPrimaryImport
bm.exe disable-referencebm.exe disable-reference -TargetServer:MySrv -TargetDatabase:BamPI
bm.exe deploy-allbm.exe deploy-all -DefinitionFile:SalesManagerView.xls
bm.exe update-allbm.exe update-all -DefinitionFile:SalesManagerView.xls
bm.exe remove-allbm.exe remove-all -DefinitionFile:SalesManagerView.xls
bm.exe get-activitybm.exe get-activities -View:SalesManagerView
bm.exe remove-activitybm.exe remove-activity -Name:PurchaseOrder
bm.exe get-viewsBm.exe get-views
bm.exe remove-viewbm.exe remove-view -Name:SalesManagerView
bm.exe get-alertsbm.exe get-alerts
bm.exe remove-alertsbm.exe remove-alerts -View:SalesManagerView
bm.exe get-defxmlbm.exe get-defxml -FileName:BAMDefinition.xml
bm.exe get-accountsbm.exe get-accounts -View:SalesManagerView
bm.exe add-accountbm.exe add-account -AccountName:domainuser -View:SalesManagerView
bm.exe remove-accountbm.exe remove-account -AccountName:domainuser -View:SalesManagerView
bm.exe get-subscriptionsbm.exe get-subscriptions -View:SalesManagerView -Alert:SalesTooLow
bm.exe add-subscriptionbm.exe add-subscription -View:v1 -Alert:a2 -AccountName:domainuser -Type:File
bm.exe remove-subscriptionbm.exe remove-subscription -View:v1 -Alert:a2 -AccountName:domainuser
bm.exe enable-alertsbm.exe enable-alerts -View:SalesManagerView
bm.exe disable-alertsbm.exe disable-alerts -View:SalesManagerView
bm.exe get-indexbm.exe get-index -Activity:PurchaseOrder
bm.exe create-indexbm.exe create-index -IndexName:Idx1 -Activity:PO -Checkpoint:State,City
bm.exe delete-indexbm.exe delete-index -IndexName:Idx1 -Activity:PO
bm.exe get-activitywindowbm.exe get-activitywindow -Activity:PurchaseOrder
bm.exe set-activitywindowbm.exe set-activitywindow -Activity:PurchaseOrder -TimeLength:6 -TimeUnit:Day
bm.exe get-rtawindowbm.exe get-rtawindow -View:ManagerView -Activity:PO -Rta:Rta1
bm.exe set-rtawindowbm.exe set-rtawindow -View:V -Activity:A -Name:R -TimeLength:5 -TimeUnit:Minute
bm.exe get-changesbm.exe get-changes
bm.exe update-livedataworkbookbm.exe update-livedataworkbook -Name:SalesManager_Live.xls
bm.exe regenerate-livedataworkbookbm.exe regenerate-livedataworkbook -WorkbookName:SalesManager_Live.xls

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

1 thought on “BAM Management Utility Commands – bm.exe”

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top