BAM - How to avoid losing data

Topics: General Questions, Server Deployment, Tips and Tricks, Visual Studio Integration
Apr 6, 2011 at 7:59 PM

Hi there

I am trying to figure out if there is any way to avoid losing data on activity and view changes while deploying BAM, I mean currently when I perform a deploy, the previous records are erased, I know BAM is not very flexible on changes on milestones and other related activity artifacts but I'like to reduce the risk of losing data and perform a redeploy just in case of being really necesary.

any information and advise is welcome

thanks!

Julian R Berlin

Coordinator
Apr 7, 2011 at 12:16 AM

Hi Julian,

Are we talking about development deployments or server deployments?  On server deployments, the BAM model is never undeployed unless you explicitly ask for it due to the exact issue that you described.  On development deployments, it is always undeployed to avoid the hassle of frequently changing the model and having it collide with the existing model.  On a server deploy, the BAM tool is instructed to do an update to the existing model, which will generally work if you simply added a field somewhere.  Any renames, rearrangements, etc. are going to conflict, and the deploy will fail (which we want so that existing data is protected).

Does that help?

Thanks,
Tom

Apr 7, 2011 at 6:42 PM

Hi Tom,

thanks a lot for your answer again ! We are talking about server deployments. it helps :)

Any recommendation to follow to avoid losing possible critical data on changes to Bam activities and views? a think is a general problem the lack of flexibility on change in BAM....

thanks a lot!

Julian

Coordinator
Apr 7, 2011 at 9:21 PM

I don't think there are many good options because the tool is so restrictive.

Per the docs:
"... update does not delete artifacts that are not described in the current definition file. It can add new checkpoints to activities, but cannot drop checkpoints from deployed activities. The update can neither rename checkpoints nor change checkpoint properties.

Once an activity has been deployed, the actions you can take on an activity become restricted. Specifically, you cannot delete items from an activity unless you are prepared to have your administrator undeploy the entire BAM activity and view sets and then redeploy them. This can cause an interruption of visibility and loss of data unless the administrator does a backup and restore of the data.

You cannot use this command to add new activities to an existing view. To add a view to an activity you must create a new view that includes the new activity. You can then undeploy the old view, but be aware that you will then lose your OLAP data history."
http://msdn.microsoft.com/en-us/library/bb226570%28v=bts.10%29.aspx

So some restrictions are hard and there is probably no way around them.  It sounds like you can delete an item from an activity and keep the data through a backup/restore, but what a pain!  The documentation around BAM is so poor that few people have much knowledge of how the update process works.

Thanks,
Tom

Apr 14, 2011 at 6:46 PM

Hi Tom

thanks a lot for your answer, I think the backup works only if the changes consisted just in new fields into the BAM definition file, if we perform renames or similar the data is lost, right ? it is possible to perform a backup from windows scripting languaje line command?  My idea is to perform a backup of the BAM database with all BAM data before proceed to deploy a new version of the definition file. and later a restore of such data.

Thank you in advance!

Julian

Coordinator
Apr 14, 2011 at 7:16 PM

Hi Julian,

You could script the SQL backup/restore or use SQL Agent jobs; I'm not sure if BizTalk has a BAM tool specifically for that purpose (don't think so).  The documentation above is referring to the backup/restore being necessary to preserve data if you delete an item from an activity.  You can always add an item to an activity and do a bm.exe -update-all and keep on going fine.

It really depends on what kind of operation you need.  Adding an item is very easy and straightforward.  Most other changes are hard!  Have you got a copy of the BizTalk 2009 BAM book?  That's probably the most BAM documentation you're going to find anywhere, but I don't know how well it covers change management.  Hopefully more than the product documentation...

Thanks,
Tom