RemovePackageLogRecords Method

DTS Programming

DTS Programming

RemovePackageLogRecords Method

The RemovePackageLogRecords method removes the package log records that satisfy the criteria of the input parameters from the database.

Applies To
PackageSQLServer Object
Syntax

object.RemovePackageLogRecords(
    PackageName,
    KeepLatest,
    PackageID,
    VersionID,
    LineageFullID
)

Part Description
object Expression that evaluates to a PackageSQLServer object.
PackageName A string specifying the package name for which log records are to be removed.
KeepLatest A Boolean which specifies whether the log records for the most recent execution are to be retained.
PackageID A globally unique identifier (GUID) string specifying the package ID for which log records are to be removed.
VersionID A GUID string specifying the version ID of the package version for which log records are to be removed.
LineageFullID A GUID string specifying the lineage full ID for which log records are to be removed.

Remarks

A package log record is written to the msdb database on the instance of Microsoft® SQL Server™ specified by the package LogServerName property each time a Data Transformation Services (DTS) package is executed, if the package LogToSQLServer property has been set. The RemovePackageLogRecords method removes these records from the database.

All parameters are required. To prevent a parameter from participating in the filter process, code the empty string "" for PackageName, PackageID, VersionID and LineageFullID, and False for KeepLatest. Coding all parameters this way will cause all package log records in the database to be removed.

The syntax of GUIDs is:

{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}

where the X are hexadecimal digits. The groupings are 8, 4, 4, 4, and 12 digits. The curly brackets are required. Spaces cannot be embedded for readability.

Prototype (C/C++)

HRESULT RemovePackageLogRecords(
    BSTR PackageName,
    VARIANT_BOOL KeepLatest,
    BSTR PackageID,
    BSTR VersionID,
    BSTR LineageFullID );

See Also

EnumPackageLogRecords Method

LineageFullID Property

LogServerName Property

LogToSQLServer Property

PackageID Property

PackageLogRecords Collection

PackageName Property

RemoveAllLogRecords Method

Retrieving DTS System, Package, and Log Data

VersionID Property