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
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

Posted on Saturday, September 15, 2012 12:20 AM BizTalk | Back to top


Comments on this post: Cleaning your BizTalk Build Server

# re: Cleaning your BizTalk Build Server
Requesting Gravatar...
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?
Left by Leonid Ganeline on Oct 01, 2012 3:35 PM

# re: Cleaning your BizTalk Build Server
Requesting Gravatar...
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
Left by Mike on Oct 04, 2012 10:35 AM

Your comment:
 (will show your gravatar)


Copyright © Michael Stephenson | Powered by: GeeksWithBlogs.net | Join free