Michael Stephenson

keeping your feet on premise while your heads in the cloud
posts - 358 , comments - 425 , trackbacks - 11

My Links

News

View Michael Stephenson's profile on BizTalk Blog Doc View Michael Stephenson's profile on LinkedIn

Twitter












Archives

Post Categories

Image Galleries

BizTalk

Mates

Cleaning your BizTalk Build Server

Just a little note for myself this one.

At one of my customers where it is still BizTalk 2006 one of the build servers is intermittently getting issues so I wanted to run a script periodically to clean things up a little.  The below script is an example of how you can stop cruise control and all of the biztalk services, then clean the biztalk databases and reset the backup process and then click everything off again.

This should keep the server a little cleaner and reduce the number of builds that occasionally fail for adhoc environmental issues.


REM Server Clean Script

REM ===================

 

REM This script is ran to move the build server back to a clean state

 

echo Stop Cruise Control

net stop CCService

 

echo Stop IIS

iisreset /stop

 

echo Stop BizTalk Services

net stop BTSSvc$<Name of BizTalk Host>


<Repeat for other BizTalk services>

 

echo Stop SSO

net stop ENTSSO

 

echo Stop SQL Job Agent

net stop SQLSERVERAGENT

 

echo Clean Message Box

sqlcmd -E -d BizTalkMsgBoxDB -Q "Exec bts_CleanupMsgbox"

sqlcmd -E -d BizTalkMsgBoxDB -Q "Exec bts_PurgeSubscriptions"

 

 

echo Clean Tracking Database

sqlcmd -E -d BizTalkDTADb -Q "Exec dtasp_CleanHMData"

 

echo Reset TDDS Stream Status

sqlcmd -E -d BizTalkDTADb -Q "Update TDDS_StreamStatus Set lastSeqNum = 0"

 

echo Force Full Backup

sqlcmd -E -d BizTalkMgmtDB -Q "Exec sp_ForceFullBackup"

 

echo Clean Backup Directory

del E:\BtsBackups\*.* /q

 

 

echo Start SSO

net start ENTSSO

 

echo Start SQL Job Agent

net start SQLSERVERAGENT

 

echo Start BizTalk Services

net start BTSSvc$<Name of BizTalk Host>


<Repeat for other BizTalk services>

 

echo Start IIS

iisreset /start

 

echo Start Cruise Control

net start CCService

Print | posted on Saturday, September 15, 2012 12:20 AM | Filed Under [ BizTalk ]

Feedback

Gravatar

# re: Cleaning your BizTalk Build Server

Hi Michael,
I'm copying your script to my code database. Great job, thanks!
Are you using the Terminator to kill the suspended instances with lost references?
10/1/2012 3:35 PM | Leonid Ganeline
Gravatar

# re: Cleaning your BizTalk Build Server

Hi Leo

Im not using terminator, I just used the old scripts for cleaning out msgbox and tracking. Do you know if terminator does anything the scripts dont already cover?

Cheers
Mike
10/4/2012 10:35 AM | Mike
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 
 

Powered by: