Published on : Oct 6, 2017
Category : BizTalk Server
This blog helps to perform various operations with BAM views using the command prompt such as:
- deploy BAM Views
- remove BAM definitions
- authorize user accounts for BAM View
First, I have created a BAM view named as “BAMOperation” with the Activities Order and Status with items as shown below.
The BAM management utility deployment command line tool, bm.exe., allows to apply, modify, and remove BAM definitions. You can use, amongst others, below commands:
- deploy-all – Deploys a BAM definition
- remove-all – Removes a BAM definition
- update-all – Updates a BAM definition
- add-account – add accounts on BAM definition
Deploy a BAM View and Activities
The BAM Definition file (BAMOperation.xml) becomes deployed using the BAM Command line utility.
Deploying of BAM definition file will create corresponding database tables, views, etc., which will organize the data in a relational view. Follow the below steps to deploy a BAM View:
- Open Command Prompt as administrator
- Navigate to BizTalk Server Installation path/ Tracking folder and use the below command:
bm.exe deploy-all –DefinitionFile:” <<FileLocation>>\ BAMOperation.xml”
which will deploy a “BAMOperation” view in BAM Portal as shown below.
Remove a BAM Definition
Administrators can use the
remove-view /
remove-activity command to remove a view and Activity from the BAM Primary Import database. Follow the below steps to remove an existing activity/view:
- Open Command Prompt as administrator.
- Navigate to BizTalk Server Installation path/ Tracking folder and use the below command.
To Remove a BAM Definition File:
bm.exe remove-all –DefinitionFile:” <<FileLocation>>\ BAMOperation.xml”
Removing a BAM definition file will remove the related tables, views, etc. which were deployed in the database and server.
Remove a BAM Activity
To remove a BAM Activity, the user needs to remove the BAM View first and then the BAM Activity they wanted to remove. Execute the below-shown command to remove the BAM View first and then the BAM Activity.
To remove a BAM View:
bm.exe remove-view -name: {view name}
To remove a BAM Activity
bm.exe remove-activity -name: {activity name}
The above command which will remove the specified activity alone form the database.
Update a BAM Activity
The User is also able to update an existing View/Activity. To update an Activity/ View, the user should remove the activity/view first by using the above-mentioned commands and then follow the below steps to update any changes in the existing View /Activity.
For example, I have removed the above “Status” activity and I have updated the activity as shown below.
We then use the below command to update the changes to the existing view:
bm.exe update-all –DefinitionFile:” <<FileLocation>>\ BAMOperation.xml”
The above command will add a table, view in the database and it will update the previous activity in the BAM Portal as shown below.
Add an Account to BAM Definition
Administrators use the
add-account command to associate users with BAM views and protect the BAM Excel Spreadsheet views from unauthorized access. When users save BAM views, the views reference a SQL connection string that is hidden within the workbook. The workbook is protected, but you must also ensure that the document is protected.
When you associate users with BAM views, you restrict access to the views to only the users or groups to whom you grant access by using the below command.
bm.exe add-account -AccountName: DomainName \UserName -View:(viewname)