List of various BAM Questions
I have created the list of problems or questions we might encounter with BAM, some or my own experiences and some I have gathered from different sources and bundled up in one forum, thought would be useful for everyone, any comments are welcome:
Exception from HRESULT: 0xC0C01B13.
Exception type: COMException
Target Site: Microsoft.BizTalk.Agent.Interop.IBTMessage ReadReferencedMessageByID(System.Guid ByRef)
Help Link: Additional error information:
This happens when the Orchestration shapes are missing from the Orchestration View, If you delete some shapes in the new version of an orchestration, and you attempt to apply the same tracking profile, an error will display, and the invalid mappings display with a warning.
You must correctly map business milestones or events and associated actions in order for Tracking Profile Editor (TPE) to work. However, the actual implementation of orchestrations may change over time for technical reasons (for example, to add more error handling). To make the migration of tracking profiles easier in such cases, the TPE supports the reuse of tracking profile with different assemblies.
Note: When you reopen a tracking profile for an assembly that has schema changes, the Tracking Profile Editor will not detect if any data items in the schema were mapped or were removed from the updated schema.
Delete all invalid mappings, and re-do the mapping by dragging items from the orchestration message schemas and actions into the associated folders.
The values of "bam_ActivityName_Active" are not moved to "bam_ ActivityName_Completed"
The values from "bam_ActivityName_Active" are not moved to "bam_activity_Completed" table this happens if the continuationID is not properly linked between the orchestrations,
If you are working on BAM you would be aware with the column names ‘IsComplete’ and ‘IsVisible’, let me explain about them,
If the process is complete, the column name 'IsComplete' will get the value as '1' which means, the active trace is currently marked as complete,
So you might ask, If that is the case, wonder why it is not been moved to the
completed table, If you are using the continuationID's to follow up with several orchestrations.
For any activity record to be moved to *_Completed table, the record must meet the following criteria:
IsVisible must be 1 (True) which really indicates that it has a BeginActivity event persisted
IsCompleted must be 1 (True) which means that the record has an EndActivity event persisted.
There is no related record in Continuation table (which means it is not waiting for any record from continued segment(s) to be reconciled to the root record.
Please check if you are using the continuationID is properly configured.
The Continuation Folder contains data items that indicate a unique instance ID, also called a continuation token. By using the continuation token, developers can link to other activities using the ContinuationID folder. You must name the two folders the same. That is the key to associating the two orchestrations together. The Continuation Folder can contain multiple data items.
ERROR: BAM Deployment failed, and then BAM Star Schema database has not been configured. Please run the bm.exe setup-database to configure the database.
Using BAM in BizTalk Server 2006 with SQL Server 2005
If you are trying to do Business Activity Monitoring using BizTalk Server 2006 Beta 1, and, SQL Server 2005, you may run into the same issue that I did. You'll probably notice that when you walk through the Configuration Manager, you cannot create the Analysis database if you are using SQL Server 2005. Beta 1 doesn't support Yukon Analysis Services yet.
You may not notice a problem until you try and deploy BAM configurations. When I tried to do so, I got a message saying Deploying View...Error:BAM Deployment failed, then BAMStarSchema database has not been configured, please run bm.exe setup-database to configure the database . Since I'm not able to create the StarSchemaDb via the Configuration Manager (because of the aforementioned Analysis Services issue), how do you get past this? If you look at the XML that you export out of the BAM Excel spreadsheet, you'll notice an element CreateOlapCube which is set to true. This is what caused my failure. So, just flip that to false, and re-run the bm.exe deploy-all command. Now all the needed bits get built and after applying a tracking profile, I can record data and view it in my shiny new BAM portal. So, for now with Beta 1, you won't have the OLAP aggregation features if you're using SQL 2005.
BAM deployment failed.
Failed to deploy BAM Analysis database.
Failed to connect to Olap server. Please make sure the Analysis Server is functional.
Cannot open connection to Analysis server 'VAMSI'.
Cannot connect to the server 'VAMSI'. The server is either not started or too busy.
Path: C:\Program Files\Microsoft Analysis Services\ Bin\msmdsrv.exe
The following MSSQLServerOLAPService services have to be started else while deploying BAM we would get the following exception.
CreateOlapCube="true" set it to CreateOlapCube="false” in the XML file,
You won't have the OLAP aggregation features, since the OLAP Cube creation was set to false. Or you can use excel and hit the button that you can set to indicate whether the pivot table goes against Real-Time Aggregation or the OLAP cubes. This button is enabled when you select the pivot table.
Cannot open Analysis server ‘VAMSI’, Cannot connect to the server ‘VAMSI’, The server is either not started or too busy
If the following service is stopped, MSSQLServerOLAPService you will get the above exception, kindly start the service.
BAM deployment failed. The same view EnrollProcessView but with different definition has already been deployed.
Always try to undeploy the previous version when the definition of the file has been modified, use ListChanges to capture the history of the deployment
"Mark selected Pivot Table as a real time aggregation" button in the Pivot Toolbar is grayed out.
"Mark selected Pivot Table as a real time aggregation" button in the Pivot Toolbar is required if selected would generate RTA aggressions else would generate the Olap cubes, look at the CreateOlapCube in the xml generated, and make it fales, and it should work as required.
BAM deployment failed.
Failed to deploy BAM Analysis database.
Failed to connect to Olap server. Please make sure the Analysis Server is functional.
Connection failed: Server name not set.
BAMConfiguration.xml file might have been modified, open the configuration file and check the following database and server names have been set as below, modify and save it,
Once modified, save the above configuration file, and run the bm dbsetup (sets up the star schema and analysis databases), to ensure you have made the change correctly.
Note: The star-schema is dynamically created and used only for creation of OLAP cubes for analysis database setup.
Cannot drag LOOPING orchestration shapes in TPE
Inside an orchestration, if the shapes are looping and we need to capture a data value, if the shapes are looping you cannot capture the KPI’s of the messages inside a looping message flow,
To do this, you create another activity and map all of the new activity milestones and data inside the loop.
Note: You cannot use the Tracking Profile Editor to view the schema associated with a shape that has a message of type System.XML.XMLDocument, since it wasn’t a schema during the debug mode as well.
Cannot drag some defined orchestration shapes in TPE
The Orchestration engine does not allow tracking for some shapes. They are as follows:
- Message Assignment
- Group (Task)
For the Message Assignment and Transform shapes, drop the enclosing Message Construct instead.
For the group(Task) shape, use a nontransactional Scope shape instead.
Regarding the Loop(While) shape, you can track the Loop
For the Terminate shape, there is no workaround, because the end event of this shape never happens in a normal scenario.
Important: You cannot track a compensation handler shape, and the shapes within it if they are in a different orchestration. Additionally, custom compensation handlers do not display in TPE, therefore, you cannot track them.ClickHere
Continuation vs Relationship
Relationship: If an orchestration calls another orchestration multiple times, use relationship… to model the process.
Required: multiple activity ID’s for each process.
Continuation: If there are multiple orchestrations but each orchestration is called only once, then use continuation to model.
Required: Single ActivityID followed with multiple continuationIDs and folders.
If you are using the tracking profile editor to map orchestration shapes/events to BAM activity, the date time value that appears in views and cubes will be in UTC (Coordinated Universal Time) time. With a little tweaking of a stored procedure for each activity, you can display the date time value in your local time.
The stored procedure to modify is: bam_
DECLARE @TimeDifference int
SELECT @TimeDifference = ROUND(DATEDIFF(mi, GetUTCDate(), GetDate()), -1)
For each variable of datetime type passed into this stored procedure, add the following:
SELECT @yourVariable = DATEADD(mi, @TimeDifference, @yourVariable)
Server Error in '/BAMQueryWebSvc' Application.
Request format is unrecognized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
System.InvalidOperationException: Request format is unrecognized.
If you look in the web.config for the service you will see that the webservice section has some protocols need to be disabbled, comment this section out of the web.config and it sould work fine, essesntially MSSet up these services to be consumed not to be browsed
Microsoft.BizTalk.Bam.QueryWebService.BAMQueryWebServiceException: Invalid activity name
Have to provide both the parameters for activityName and relatedActivity, make sure you provide the correct activity name that can be captured from the Bam_Metadata_Activities.
Then the following webservice would be opened ‘http://localhost/BAMQueryWebSvc/QueryWebService.asmx/GetRelatedInstances’
Note: BAMQueryWebService is not fully supported in BizTalk 2004. Hence the recommended way is to access BAM data by connecting to the SQL server and capture the various views BAM creates, such as "Querying Instance Data".
Expose BAM Web Service
BAM in BizTalk Server 2006 builds on the existing Web Services available in BizTalk Server 2004. The enhanced web services interface now exposes; the query of aggregate and instance data, creation of alerts and retrieval of BAM configurations. This enhanced web services interface means that custom application can be developed, exposing BAM within their user interface.
The BAM web services are grouped into two categories:
1. BamQueryService – The following services provides, consumers the ability to specify the columns and filters for the instance data that should return.
2. BamManagementService – The following service provides, consumers the ability to manage subscriptions and alerts among other management operations
What would be a standard approach programmatically accessing Primary Import Database? Where could we get information about BAM Query Web Service. BAM Query Web Service has no clear usage documentation.
This is available in BTS2006,
For accessing information on PrimaryImport Database, you can use
You can access this at :
Currently, the documentation is still being worked on.
These are the methods, (those prefix with Get for accessing).
Posted by Keith
How to find out the BAM Assembly version?
Open the table bam_Metadata_ConfigVersion, finf the column name as ‘Version’ , you will have something like this, ‘3.0.6070.0’
Open the table ‘bam_Metadata_Transactions’ under the column ‘AssemblyVersion’ you will have something like this, ‘3.0.6070.0’
QueryInterface for interface DTS.CustomTask failed
This error has been fixed in SQL Server 200 Service Pack 2. Make sure you apply the service pack to the SQL Server machine, and any client machines that will be running the .Net code, since DTS is a client side tool.
Exception information: TDDS failed to read from source database.
Specified cast is not valid.
You should stay with SQL Server 2000 for BizTalk 2004, BizTalk 2004 and SQL Server 2005 won't work together. Else need to monitor all the failing queries and fix them one by one, but it will be hard, if not impossible.
Biztalk 2004 w/SP1 will not support
Biztalk2004 w/SP1 upgrade to Biztalk2006.
Upgrade SQL2000 to
Biztalk2004 w/SP1 upgrade SQL 2000 to
Posted by Keith
Execute batch error. Exception information: TDDS failed to batch execution
of streams. SQLServer: BIZTALKDEV, Database: BizTalkDTADb. Cannot insert
duplicate key row in object 'Hws_Tasks' with unique index 'pk_Hws_Tasks'.
The statement has been terminated..
This warning event can be safely ignored. Retry will be done with a
different key. The event is warning users for something they really
should not worry about.
Note: to be very certain check the ActivityID or continuationID’s ( if at all used ) are appropriate.
I would like to do an install of BAM on a BizTalk 2004 stand-alone
server which is already configured but hasn’t got BAM Analysis database.
Is that possible without affecting the rest of the BTS installation (I
would like to keep the already existing databases created by the
previous config)? I would like to install the Analysis services and then reconfigure
BizTalk to use the BAM with OLAP.
Install the SQL Server 2000 Analysis Services.
Immediately afterwards, install the SP3a (Service Pack 3a) for OLAP (SQLOLAP).
Run the ConfigFramework utility and select the Join option, and just choose the BAM Analysis databases for OLAP cubes creation, Note: The OLAP cubes and the cubing DTS package are all dynamically created by the BAM Manager command line utility bm.exe.
Which aggregation to choose between: real-time aggregation (RTA) and scheduled aggregation. BAM real-time aggregation vs. scheduled aggregation
BAM supports two types of aggregations: real-time aggregation (RTA) and scheduled aggregation.
The biggest difference is the underling storage.
Real-time aggregation (RTA): The storage of RTA is a SQL table and the aggregation is updated and maintained by SQL trigger. The event importing and aggregation update are completed in the same transaction, therefore its data latency is negligible and almost real-time.
The scheduled aggregation: is saved in Olap cubes which need to be processed periodically by the cubing DTS package (btw the Olap cubes and the cubing DTS package are all dynamically created by the BAM Manager command line utility bm.exe).
The biggest advantages of RTA are its zero-latency and low maintenance. Once your new instance data is in the BAM database, the aggregation instantly reflects the new data. And there's no need to run any DTS package, the sql trigger takes care of everything for you automatically. Compared to scheduled aggregation though, RTA doesn't support as many dimensions and measures, and it can only keep relatively short period of data to keep satisfactory query performance. Scheduled aggregation, on the other hand, have little problem handling years of years of enterprise data, and can support much more dimensions and measures. Scheduled aggregation's advantanges don't come without a price -- it needs Analysis Service licence, a star-schema database and scheduling of the cubing DTS. And the new instance data won't make into the cubes until the next cubing DTS run.
After you understand the pros and cons of both aggregations, it's easy to understand their usage scenarios: use RTA for time-critical, small set of Key Performance Indicators (KPI) type of tracking and use scheduled aggregation for historical/trend analysis which normally involves large volume of data and requires complex cubes.
posted by chunyu
Failed to open BAM Excel workbook file BAMapiSample.xls. or "fnGetString" or "Unable to get resource string" popup error dialogs or "Old Format or Invalid Type Library"
Regional settings should be set to english and it works.
To work around this problem, you can either install the Office Multilingual User Interface (MUI) pack which can be found on http://www.microsoft.com/ or change your locale to US-EN just for the duration of the deployment.
Failed to instantiate DSO Object. Please make sure DSO is installed and functional.
Analysis Services were not found, and the process is looking for these services, not been found hence the error, kindly install the Analysis services, the error would vanish or as Mike suggested you can just modify the BAM Excel Spreadsheet Mark by selecting pivot table as Real Time Aggregation for more info refer this site: Mike Holdorf's Blog
After mapping the TPE when we try to run the process we might receive the following error, ‘Stored Procedure Does Not Exist’
When you create your BAM Activities, do not use spaces in the Activity names!
Avoid using any spaces in BAM activities, since objects with no spaces would be created in the table, and the required stored procedures which is created would still try to refer to the object with space not finding will throw an exception.
for more info refer the following site
Error in Deploying BAM Workbook after Upgrading to SQL Server 2005
If you run into the following error message when deploying a BAM workbook with BM.exe, please read on...
SqlServerError: Source: .Net SqlClient Data Provider
Message: There is already an object named 'NS119569338444506776308359935743536951EventBatchDetails' in the database.
There is already an object named 'NS11956933844450677630038743536951EventBatchDetails' in the database.
Suppose you have a bam workbook named abc.xls (or abc.xml exported from BAM Excel add-in). You deploy this workbook with SQL Server 2000, and later you decide to remove it. Due to a SQL Server 2000 bug, some stored procedures for the NS service will not be removed from the database. After upgrading to SQL Server 2005, these stored procedures are still there.
Now, you decide to deploy abc.xls / abc.xml again to SQL Server 2005, and that's when you will probably see the above error messages. The walkaround is:
1. Open abc.xml
2. Locate the
3. Manually change the ID to some thing else, such as ID512CA71854F642EFAF673C819F969D2B
4. Save and deploy abc.xml
posted on Wednesday, December 07, 2005 3:19 PM by xinxin
Error Message or BAM Cube Update DTS Package Fails
You may encounter the error "Unable to connect to registry on the server (machineName), or you are not a member of the OLAP Administrators group on this server" or the BAM cube DTS fails when you run the BAM cube update DTS Package.
There are certain permissions required to connect to an OLAP server through the OLAP Manager or through DSO script,
Step1: Make sure you have SQL2000 SP4 installed on your Analysis Server.
To resolve this problem, see "Knowledge Base Article 838166: You must install the SQL Server 2000 update that KB article 831950 describes to run BizTalk Server 2004" available at (http://go.microsoft.com/fwlink/?LinkId=22840)
Need to have the admin privileges to deploy OLAP cubes to your Analysis Server. Check out this KB article http://support.microsoft.com/?id=231951 to make sure you have all the necessary permissions.
Happy hunting - Vamsi