Geeks With Blogs

News View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn
Michael Stephenson keeping your feet on premise while your heads in the cloud

The other day I was having an issue with our build server so I decided to write a script to reconfigure BizTalk on our build or development servers. My plan was to run this regularly on a scheduled basis to ensure our build servers were kept clean.

I thought id write a little about this as it may be useful to others. Note the script is aimed at a single machine hosting BizTalk 2006 R2 and SQL Server.

Before I started I exported the configuration of our BizTalk Group to a file and then amended the credentials etc.

The list of tasks I would perform to clean and reconfigure our server is as follows:

Task

Description

Delete log file

When I run the BizTalk Configuration tool from the command line I will make it log to a file for troubleshooting any problems. Before I start the first clean up activity is to delete any old logs

Stop the following services:

 

  • W3SVC
  • SQLServerAgent

I stop any services which may want to access the BizTalk databases

Restart the following services:

 

  • MsSQLServer
  • MsDTSServer
 

Remove the EDI BAM definitions

When EDI is setup the BAM definitions for this feature are configured creating the usual BAM components. We need to remove these using BM.exe before we unconfigure BizTalk because unconfiguring the group will not remove the BAM Definitions

Use the BizTalk Configuration Editor to unconfigure the group.

 

Stop the WMI Service and any dependant services as advised by the BizTalk documentation

 

Delete the backup of the SSO Key

Note this is just for a development machine, you need to be careful about this on any real environment. I just delete the backup file here so I can recreate it when configuring the group

Unregister and delete the SSNS application for BAM Alerts

I will use NsControl.exe to do this

Run a SQL Script to drop the BizTalk databases

 

Delete the share and folder used by BAM Alerts

These are not removed when the group is unconfigured so need to be done manually

Start the following services:

 

  • Winmgmt (and any dependant services which I stopped earlier)
  • Start w3svc

Ensure any services which may be used while configuring BizTalk are started

Run the BizTalk Configuration Editor passing in the file containing the desired configuration.

 

 

To implement this I created a Visual Studio solution and wrote an MsBuild script and used some of the Microsoft.Sdc tasks. The below picture shows the files in this solution.

Its pretty simple and I will provide a link to the sample at the end of this post.

Some of the other ways I have extended this script since include:

  • Using an MsBuild task to register some custom adapters
  • Using an MsBuild task to register the WSE2 and Enterprise LOB adapters
  • Using an MsBuild task to add adapter handlers
  • Using the MsBuild configuration dictionary stuff I have blogged about in previous posts to configure the BizTalk Configuration xml file for different environments

 

The link to the sample for this post is: http://www.box.net/shared/t4k0m6ps5y

 

Posted on Wednesday, February 4, 2009 11:55 PM BizTalk , MsBuild | Back to top


Comments on this post: Reconfigure BizTalk with MsBuild

# re: Reconfigure BizTalk with MsBuild
Requesting Gravatar...
their listeners. Not rarely get to hear the three: Your music is like vacation!. C online shopping,harming �glamorous

�terrific!

Under this motto, Nightingales play up in the fideljo. They are specialized
Stop fideljo from 19:43 hours to about Sports Shoes,2.
finest interpretations of the most famous works of pop history.
Left by linming0303 on Nov 08, 2017 6:39 PM

# re: Reconfigure BizTalk with MsBuild
Requesting Gravatar...
Stop fideljo from 19:43 hours to about Sports Shoes,2.their listeners. Not rarely get to hear the three: Your music is like vacation!. C online shopping,harming �glamorous

�terrific!

Under this motto, Nightingales play up in the fideljo. They are specialized
Left by linming0303 on Nov 08, 2017 6:40 PM

Your comment:
 (will show your gravatar)


Copyright © Michael Stephenson | Powered by: GeeksWithBlogs.net