Problem deploying Business Rules: The database “BizTalkDb:BizTalkRuleEngineDb” associated with the deployment driver does not match the database “:” specified during product configuration
We encountered a problem when deploying Business Rules on a colleagues development environment, while it wasn’t happening on all the other development environment. We are using the BizTalk Deployment Framework, but the problem will also ocurr when you are not using the Deployment Framework.
The error that occurred was:
Deploying rule set ‘<RULESET>’ version 1.8…
Failed: Microsoft.RuleEngine.RuleEngineDeploymentDBConfigurationMismatchException: The database “BizTalkDb:BizTalkRuleEngineDb” associated with the deployment driver does not match the database “:” specified during product configuration.
at Microsoft.BizTalk.RuleEngineExtensions.RuleSetDeploymentDriver.Deploy(RuleSetInfo ruleSetInfo)
at DeployBTRules.DeployRules.ProcessPolicies(DeployRulesCommandLine cl, RuleSetDeploymentDriver dd)
at DeployBTRules.DeployRules.Main(String args)
Because the problem only existed on one of the numerous development environments, it surely had something to do with configuration. I came across some resources that helped me find the solution.
Because I use my own blog as my own wiki page, I will share what I looked at and will hopefully help others find a solution quickly.
1) Check Registry
The first thing I looked at was the registry. Because there are some configuration values for the Business Rules in there, it’s a good start. It wasn’t the solution for us, but have a look anyway.
Go to HKLM\Software\Microsoft\BusinessRules\3.0 or HKLM\Software\Wow6432Node\Microsoft\BusinessRules\3.0 and check the values. Are your database and server filled out there?
And (especially if your machine is part of a group) you need to doublecheck these values as well (Wow6432Node for 64-bit machines):
- HKLM\Software\Microsoft\BusinessRules\3.0\DeploymentDriverAssembly = “Microsoft.RuleEngine, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31bf3856ad364e35”
- HKLM\Software\Microsoft\BusinessRules\3.0\DeploymentDriverClass = “Microsoft.RuleEngine.RuleSetDeploymentDriver”
By doing this you will be using the rules only deployment driver and you won’t be able to track policies in orchestrations.
2) Check Database
Our problem was actually in the BizTalk Management Database. To be more specific, in the adm_Group table. The Rule Engine database and server name weren’t filled out. The RuleEngine server and database name are also in two other tables (adm_OtherDatabases and adm_OtherBackupDatabases), but they don’t matter.
Look at the table by selecting the data:
- SELECT * FROM adm_Group
Look at the values of RuleEngineDbServerName and RuleEngineDbName. They turned out to be empty:
Now, fill out the right values and try deploying again. This worked for me 🙂 No need to restart the host instances by the way.