0

How to Clear or Purge the Biztalk Tracking Database

Posted by Chris Straw on April 7, 2012 in BizTalk, SQL Server |

Stop all running Biztalk services, load up SQL Management Studio, on the BiztalkDTADb database run the following script. Note that this script does not archive data.

declare @dtLastBackup datetime
set @dtLastBackup = GetUTCDate()
exec dtasp_PurgeTrackingDatabase 1, 0, 1, @dtLastBackup

go
DBCC SHRINKFILE (N'BizTalkDTADb' , 0)
go
DBCC SHRINKFILE (N'BizTalkDTADb_log' , 0)
go
DBCC SHRINKFILE (N'BizTalkDTADb' , TRUNCATEONLY)
go
DBCC SHRINKFILE (N'BizTalkDTADb_log' , TRUNCATEONLY)
go


The last part shrinks the database and log files.

Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2011-2019 Chris Straw All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.