BizTalk Server: Useful BAM Management Utility Commands
Introduction
Administrators of Business Activity Monitoring (BAM) definitions use the BAM Management utility to manage and maintain all aspects of the BAM infrastructure.
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 run-time infrastructure on the server, which includes the BAM Primary Import database, BAM Star Schema database, BAM Analysis database, and 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 is an essential tool that is been used for tracking in BizTalk/WF/WCF. Below are the list of bam commands, which will be useful for BizTalk-BAM Developers. Follow the below two steps to execute the commands.
Steps
- Open Command Prompt with Administrative Privileges
- Navigate to the BizTalk installation folder and get into tracking folder (Eg: C:\Program Files (x86)\Microsoft BizTalk Server 2010\Tracking)
BAM Commands
You can execute the BAM commands on a different server from your machine by using the second command in all the below list:
Definition File
Deploy BAM Activity with Definition File
- bm.exe deploy-all -DefinitionFile:MyDef.xml
- bm.exe deploy-all -DefinitionFile:MyWorkbook.xls -Server:machine1
Undeploy BAM Activity with Definition File
- bm.exe remove-all -DefinitionFile:MyDef.xml
- bm.exe remove-all -DefinitionFile:MyWorkbook.xls -Server:machine1
To Update BAM Definition File
- bm.exe update-all -DefinitionFile:MyDef.xml
- bm.exe update-all -DefinitionFile:MyWorkbook.xls -Server:machine1
To Get all BAM Definition from BAM Database
- bm.exe get-defxml -FileName:BAMDefinition.xml
- bm.exe get-defxml -FileName:MyDef.xml -Server:MyServer -Database:MyPI
Activity
To Remove BAM Activity without Definition File
- bm.exe remove-activity -Name:PurchaseOrder
- bm.exe remove-activity -Name:PO -Server:MyServer -Database:MyPrimaryImport
To get all activities in BAM
- bm.exe get-activities -View:SalesManagerView
- bm.exe get-activities -Server:MyServer -Database:MyPrimaryImport
View
To Remove BAM View without DefinitionFile
- bm.exe remove-view -Name:POView
- bm.exe remove-view -Name:MyView -Server:MyServer -Database:MyPrimaryImport
To get all views in BAM
- bm.exe get-views -Activity:PO1
- bm.exe get-views -Server:MyServer -Database:MyPrimaryImport
View Accounts
To add accounts for accessing BAM views
- bm.exe add-account -AccountName:john -View:PurchaseOrder
- bm.exe add-account -AccountName:Agents -View:PO -Server:Srv1 -Database:Db2
To get all accounts which has been given access to particular view
- bm.exe get-accounts -View:PurchaseOrder
- bm.exe get-accounts -View:ShipmentOrder -Server:Ship -Database:ShipDatabase
Alerts
To Remove BAM Alerts
- bm.exe remove-alerts -View:SalesManagerView
- bm.exe remove-alerts -View:Shipments -Server:Ship1
To get all alerts configured in BAM
- bm.exe get-alerts -View:ManagerView
- bm.exe get-alerts -Server:MyServer -Database:MyPrimaryImport
To enable an BAM alert
- bm.exe enable-alerts -View:SalesManagerView
- bm.exe enable-alerts -View:SalesManagerView -Server:s1 -Database:db2
To Disable a BAM Alerts
- bm.exe disable-alerts -View:SalesManagerView
- bm.exe disable-alerts -View:SalesManagerView -Server:s1 -Database:db2
To get list of subscriptions for the Alerts in BAM
- bm.exe get-subscriptions -View:SalesManagerView -Alert:SalesTooLow
- bm.exe get-subscriptions -View:Shipments -Alert:SlowShipment -Server:Ship1
To add a Subscription for an alerts
- bm.exe add-subscription -View:v1 -Alert:a2 -AccountName:domain\user -Type:File
- bm.exe add-subscription -View:v1 -Alert:a2 -AccountName:domain\user -Type:Email -Email:useremail@domain.com
To Remove-Subscription
- bm.exe remove-subscription -View:v1 -Alert:a2 -AccountName:domain\user
- bm.exe remove-subscription -View:v1 -Alert:a2 -AccountName:user -Server:s1
BAM Configuration
To get the BAM Configuration details
- bm.exe get-config -FileName:MyConfig.xml
- bm.exe get-config -FileName:BAMConfiguration.xml -Server:OrdersServer
To update the BAM Configuration details
- bm.exe update-config -FileName:MyConfig.xml
References
You can find more informations about BAM Management Utility here:
See Also
Another important place to find a huge amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.