This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The EnumLogReaderAgentSessions2method returns a QueryResults object that enumerates execution status data for the Log Reader Agent specified.
A QueryResults object that contains one result set defined by these columns.
Executing state. Interpret using SQLDMO_TASKSTATUS_TYPE.
Date and time of last scheduled execution.
Date and time of message logging.
Elapsed time of the session in seconds.
Average number of commands delivered per second.
Latency, in milliseconds, between the Publisher committing a transaction and that transaction entering the distribution database.
Cumulative time measurement for delivery in seconds.
Cumulative number of transactions delivered in the session.
Cumulative number of commands delivered in the session.
Average number of commands per transaction delivered in the session.
Number of session history records.
When nonzero, Microsoft SQL Server error message number.
In the result set, date and time data returned in start_time and timeis formatted as YYYYMMDD hh:mm:ss.fff.
Represents the year in four digits.
Represents the month in two digits (zero padded).
Represents the day of the month in two digits (zero padded).
Represents the hour using two digits, a twenty-four hour clock (zero padded).
Represents the minute in two digits (zero padded).
Represents the second in two digits (zero padded).
Represents the fractional part of the second in three digits.
For example, the value 20040512 18:12:00.000 is interpreted as 6:12 P.M., May 12, 2004.
The EnumLogReadAgentSessions2 method differs from the EnumLogReaderAgentSessions method by including the lEstimatedNumRecords parameter, which allows the application to pass an estimated number of QueryResults rows. This allows an application to avoid the performance overhead associated with repeatedly allocating and freeing memory.