EnumPackageLogRecords Method

DTS Programming

DTS Programming

EnumPackageLogRecords Method

The EnumPackageLogRecords method returns a PackageLogRecords collection containing data from the package log records in the database. These package log records satisfy the criteria of the input parameters.

Applies To
PackageSQLServer Object
Syntax

Set collection = object.EnumPackageLogRecords(
    PackageName,
    ReturnLatest,
    PackageID,
    VersionID,
    LineageFullID
)

Part Description
collection Expression that evaluates to a PackageLogRecords collection.
object Expression that evaluates to a PackageSQLServer object.
PackageName A string specifying the package name to which log records in the collection are to be limited.
ReturnLatest A Boolean specifying whether log records for only the latest version of each package are to be included in the collection.
PackageID A globally unique identifier (GUID) string specifying the package ID to which log records in the collection are to be limited.
VersionID A GUID string specifying the version ID of the package version to which log records in the collection are to be limited.
LineageFullID A GUID string specifying the lineage full ID to which the collection is to be limited.

Remarks

A package log record is written to the msdb database on the 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. For Microsoft® SQL Server™ 2000 Meta Data Services packages, the log record's lineage full ID links to the package lineage record. For other packages, a GUID is created.

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 ReturnLatest. Coding all parameters this way will cause all package log records in the database to be returned, which may result in an unmanageably large collection.

The syntax of GUIDs is:

{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}

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

Prototype (C/C++)

HRESULT EnumPackageLogRecords(
    BSTR PackageName,
    VARIANT_BOOL ReturnLatest,
    BSTR PackageID,
    BSTR VersionID,
    BSTR LineageFullID,
    IDTSPackageLogRecords **pRetVal );

See Also

LineageFullID Property

LogServerName Property

LogToSQLServer Property

PackageID Property

PackageLineages Collection

PackageLogRecords Collection

PackageName Property

RemovePackageLogRecords Method

Retrieving DTS System, Package, and Log Data

VersionID Property