Microsoft KB Archive/894253

= FIX: The dtasp_PruneTrackingdatabase stored procedure may take many hours to clean up the DTA database in BizTalk Server 2004 =

Article ID: 894253

Article Last Modified on 11/15/2007

-

APPLIES TO


 * Microsoft BizTalk Server 2004 Standard Edition
 * Microsoft BizTalk Server 2004 Partner Edition
 * Microsoft BizTalk Server 2004 Enterprise Edition
 * Microsoft BizTalk Server 2004 Developer Edition

-





SYMPTOMS
In Microsoft BizTalk Server 2004, the BizTalk Server Software Development Kit (SDK) Samples\Admin\Database Maintenance folder contains the Purge_DTADB.sql script. You can run this script to create the dtasp_PruneTrackingdatabase stored procedure. Then, you can use this stored procedure to clear information from the BizTalk Server Document Tracking and Activity (DTA) database.

However, when you run the dtasp_PruneTrackingdatabase stored procedure to clean up your DTA database, you may experience the following symptom: If your DTA database is large, the dtasp_PruneTrackingdatabase procedure may take many hours to finish the cleanup operation. For example, the dtasp_PruneTrackingdatabase procedure might require 20 hours or more to clean up a large DTA database.



CAUSE
This problem occurs because of the method that the dtasp_PruneTrackingdatabase procedure uses to clear information from the DTA database.

To clear information from the database, the dtasp_PruneTrackingdatabase procedure removes the particular row from the database table instead of removing and then re-creating the whole table. Therefore, it might take a long time for the dtasp_PruneTrackingdatabase procedure to finish purging the DTA database.

Note While there is some default information that must be written to some tables in the DTA database, it is generally quicker for a procedure to remove and then re-create the whole table than to remove rows from the particular database table.



Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Prerequisites
No prerequisites are required to install this hotfix.

Restart requirement
You do not have to restart your computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.   Date         Time   Size    File name ---  08-Jan-2005  02:25  27,130  Bts_tracking_shrinkexistingdatabase.sql Note Because of file dependencies, the most recent hotfix that contains these files may also contain additional files.

Hotfix installation information
This hotfix contains a Microsoft SQL Server 2000 script that is optimized for cleaning up the existing BizTalk Server DTA database of all completed instance information. After you run this script, only information about instances that have not yet finished running remains in the DTA database. This cleanup process runs quickly when the number of incomplete instances in the tracking database is low. To run this script, follow these steps:  Shut down all the BizTalk Server-related services that are on the computer. Back up your BizTalk Server DTA database to make sure that you can recover it if a disaster occurs. Run the hotfix package to extract the Bts_tracking_shrinkexistingdatabase.sql script. Run the Bts_tracking_shrinkexistingdatabase.sql script by using SQL Query Analyzer. To do this, follow these steps:  Click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer. In the SQL Server list, type the name of the computer that is running SQL Server 2000, click the option that you want to use to authenticate with SQL Server 2000, and then click OK.</li> On the Query menu, click Change Database, click your BizTalk Server DTA database, and then click OK. For example, click BizTalkDTADb, and then click OK.</li> On the File menu, click Open, locate and then click the Bts_tracking_shrinkexistingdatabase.sql file that you extracted, and then click Open.</li> Press F5 to run the script.</li></ol> </li></ol>

When this script runs, it creates several tables together with a stored procedure. Then, the cleanup process runs. This script is a simple script and it typically runs very quickly. However, you may want to test this script against a large database to determine whether it runs quickly enough for your requirements.

Important When you use the dtasp_PruneTrackingdatabase stored procedure to clean up the BizTalk Server DTA database, you can configure the dtasp_PruneTrackingdatabase stored procedure to clear items that are earlier than a particular date. You cannot configure the Bts_tracking_shrinkexistingdatabase.sql script to perform this same functionality. The Bts_tracking_shrinkexistingdatabase.sql script truncates the tables in the DTA to clear all completed instances from the DTA database. Incomplete instances are not removed.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional query words: eBiz BTS BTS2004 purge duration delay lag

Keywords: kbbug kbfix kbqfe kbbiztalk2004presp2fix kbhotfixserver KB894253

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.