Saturday, February 26, 2011

The BAM Star Schema database has not been configured. Run bm.exe setup-databases to configure the database

If you have tried setting up the BizTalk ESB Toolkit 2.1 to work with BizTalk 2010 and you're interested in BAM (Business Application Monitoring) for anything going onto and through the bus using BAM (nice feature) then you may get the following error when attempting to deploy the BizTalk ESB BAM definition files for exception handling and itinerary events:

C:\Program Files (x86)\Microsoft BizTalk Server 2010\Tracking>bm deploy-all -Def initionFile:"C:\program files (x86)\Microsoft BizTalk esb toolkit 2.1\bam\micros oft.biztalk.esb.bam.exceptions.xml" Microsoft (R) Business Activity Monitoring Utility Version 3.9.469.0 Copyright (C) Microsoft Corporation. All rights reserved. Using 'BAMPrimaryImport' BAM Primary Import database on server 'FOO-BAR'. .. Deploying Activity... Done. Deploying View... ERROR: The BAM deployment failed. The BAM Star Schema database has not been configured. Run bm.exe setup-databases to configure the database.

These are the commands required to import the Exception and the Itinerary BAM definitions:

Bm.exe deploy-all -DefinitionFile:"C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit 2.1\Bam\Microsoft.BizTalk.ESB.BAM.Itinerary.xml"

and for exception handling definitions:

Bm.exe deploy-all -DefinitionFile:"C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit 2.1\Bam\Microsoft.BizTalk.ESB.BAM.Exception.xml"

So how do you get the BAMStarSchema database into SQL Server? This is not particually intuitive but it is done during the BizTalk configuration process and in particular when configuring the BAM Tools feature:



If you got the above error, it was probably likely to do with the fact you didn't check the Enable Analysis Services for BAM aggregations checkbox during configuration of BizTalk after setup. When you check that checkbox, two more databases will appear in the Database Name list; BAMAnalysis and BAMStarSchema. Clicking Apply Configuration creates those missing databases ready for the activity import later.

Once you have created those databases, re-run the ESB BAM activity import and you should get something like the following:

C:\Program Files (x86)\Microsoft BizTalk Server 2010\Tracking>bm deploy-all -Def
initionFile:"C:\program files (x86)\Microsoft BizTalk esb toolkit 2.1\bam\micros
oft.biztalk.esb.bam.exceptions.xml"
Microsoft (R) Business Activity Monitoring Utility Version 3.9.469.0
Copyright (C) Microsoft Corporation. All rights reserved.

Using 'BAMPrimaryImport' BAM Primary Import database on server 'FOO-BAR'.
..

Deploying Activity... Done.
Deploying View... Done.
Deploying Alert... Done.
Deploying Security... Done.

The import may still fail as it might be due to the way you have configured SQL Server, then I will write another post as to what the cause of this might be sometime soon...

UPDATE: If deploying Views fails for you, check this post as it might help: http://www.simonrhart.com/2011/03/deploying-view-error-bam-deployment.html

1 comment:

Mark Brimble said...

Thanks very helpful