Tallan Blog

Tallan’s Experts Share Their Knowledge on Technology, Trends and Solutions to Business Challenges

Cleaning up BizTalk Databases

One maintenance task that I often perform when finishing development on a client is to refresh my BizTalk environment.  This usually includes cleaning up the tracking and MessageBox databases of old tracking data and messages.  The BizTalk 2010/2013 installation includes a set of stored procedures that can assist in this effort and ensure a BizTalk environment.

One word of warning, the following should not be performed on a production environment.

  • The first step is to stop all BizTalk Host Instances and stop IIS.
    Create the ‘bts_CleanupMsgbox’ stored procedure by executing the <BizTalk Installation>\Schema\msgbox_cleanup_logic.sql on the BizTalkMsgBoxDb.
  • After the creation of the stored procedure run the following SQL query:

execute bts_CleanupMsgBox

  • Then execute the bts_PurgeSubscriptions stored procedure using the following query:

execute bts_PurgeSubscriptions

  • The dtasp_CleanHMData stored procedure within the BizTalkDTADb  database will clean up the tracking database.  Execute the following query against the BizTalkDTADb:

execute dtasp_CleanHMData

  • Start all BizTalk Host Instances and start IIS.

More information can be found on MSDN

Learn more about Tallan or see us in person at one of our many Events!

Share this post:

1 Comment. Leave new

Transaction Timeouts Error while applying the CU patch on BizTalk Server | Gautam's Integration Blog
May 30, 2015 1:53 am

[…] asked customer to clear the data and bring down the size of […]