BizTalk Server 2002 ~ Tracking Documents
Tracking Database Archive/Delete Stored Procedure Usage

This topic describes the syntax and arguments in the Tracking database SQL scripts.

Syntax

The following code is the syntax used in the dta_purge_old_records stored procedure:

[ @nPurgeType = ] nPurgeType,
[ @nPurgeValue = ] nPurgeValue,
[ @nCompletedInterchangesOnly = ] nCompletedInterchangesOnly,
[ @nArchiveFlag = ] nArchiveFlag
[ , [ @nvcArchiveDBServer = ] N'nvcArchiveDBServer' ] 
[ , [ @nvcArchiveDBName = ] N'nvcArchiveDBName' ] 

Arguments

The following are the arguments used in the syntax:

[ @nPurgeType = ] nPurgeType

The [ @nPurgeType = ] nPurgeType argument is an integer value that indicates whether to select the interchanges for deleting by timestamp or by row count. If nPurgeType is 1, then records are deleted by timestamp. If nPurgeType is 2, then records are deleted by row count.

[ @nPurgeValue = ] nPurgeValue

The [ @nPurgeValue = ] nPurgeValue argument is an integer value. The meaning of this argument depends on the value of nPurgeType.

If the value of nPurgeType is 1, then nPurgeValue represents the number of hours to subtract from CURRENT_TIMESTAMP to determine how to archive interchanges older than a certain date and time. For example, if you specify 96 as nPurgeValue, then you archive interchanges that are older than 96 hours (four days).

If the value of nPurgeType is 2, then nPurgeValue represents the number of interchanges to be left in the database after records are archived and deleted from the database. For example, specifying 25,000 results in archiving all interchanges below the top 25,000 rows.

[ @nCompletedInterchangesOnly = ] nCompletedInterchangesOnly

The [ @nCompletedInterchangesOnly = ] nCompletedInterchangesOnly argument is an integer value that configures whether or not interchanges that require additional processing are deleted from the database. For example, some interchanges or documents might be waiting for an acknowledgement or might have to be resubmitted.

If you configure nCompletedInterchangesOnly to equal 0, then the purge job deletes interchanges and documents whether or not they still require additional processing. Setting this argument to 0 results in faster completion of the purge job because there is less filtering.

If you configure nCompletedInterchangesOnly to equal 1, then the purge job does not delete interchanges and documents that require additional processing. Setting this argument to 1 results in slower completion of the purge job because there is more filtering.

[ @nArchiveFlag = ] nArchiveFlag

The [ @nArchiveFlag = ] nArchiveFlag argument is an integer value that indicates whether the stored procedure archives interchange and document records before deleting them. If the value of nArchiveFlag is 0, then the stored procedure does not archive any interchange or document records. If the value of nArchiveFlag is 1, then the stored procedure archives the interchange and document records before they are deleted from the database.

[ @nvcArchiveDBServer = ] nvcArchiveDBServer

The [ @nvcArchiveDBServer = ] nvcArchiveDBServer argument is an optional argument. Configure this argument if you configure nArchiveFlag to equal 1. This argument is an nvarchar(128) data type and it specifies the name of the database server where the stored procedure archives the interchange and document records.

[ @nvcArchiveDBName = ] nvcArchiveDBName

The [ @nvcArchiveDBName = ] nvcArchiveDBName argument is an optional argument. Configure this argument if you configure nArchiveFlag to equal 1. This argument is an nvarchar(128) data type and it specifies the name of the database where the stored procedure archives the interchange and document records.


Did you find this information useful? Please send your suggestions and comments about the documentation to BizTalk Server Documentation Feedback@microsoft.com



Page view tracker