EnumQueueReaderAgentSessionDetails Method

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.

TheEnumQueueReaderAgentSessionDetails method returns a QueryResults object that enumerates detailed information about a Queue Reader Agent session related to the specified publication.

Syntax

object
.EnumQueueReaderAgentSessionDetails(
lPublicationID
,
SessionID
,
lEstimatedNumRecords 
)
as
QueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.

  • lPublicationID
    Long integer that identifies the publication by ID.

  • SessionID
    String that identifies the agent session by ID.

  • lEstimatedNumRecords
    Long integer that specifies the estimated number of QueryResults rows to return.

Prototype (C/C++)

HRESULT EnumQueueReaderAgentSessionDetails (
long lPublicationID, 
SQLDMO_LPCSTR SessionID,
long lEstimatedNumRecords,
LPSQLDMOQUERYRESULTS *ppResults);

Returns

A QueryResults object that contains one result set defined by these columns.

Column

Data type

Description

commands_processed

integer

Cumulative number of commands processed in the session.

comments

nvarchar(256)

Descriptive text.

error_id

integer

When nonzero, indicates Microsoft SQL Server error message number.

runstatus

integer

Executing state. Interpret using SQLDMO_TASKSTATUS_TYPE.

subscriber

sysname

Name of the Subscriber.

subscriberdb

sysname

Name of the subscription database.

time

nvarchar(24)

Date and time of message logging.

transaction_id

integer

Transaction identifier.

transaction_status

integer

Current status of the transaction.

Remarks

In the result set, date and time data returned in time is formatted as YYYYMMDD hh:mm:ss.fff.

Date part

Description

YYYY

Represents the year in four digits.

MM

Represents the month in two digits (zero padded).

DD

Represents the day of the month in two digits (zero padded).

hh

Represents the hour using two digits, a twenty-four hour clock (zero padded).

mm

Represents the minute in two digits (zero padded).

ss

Represents the second in two digits (zero padded).

fff

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 EnumQueueReaderAgentSessionDetails method includes the lEstimatedNumRecords parameter, which allows an application to pass an estimated number of QueryResults rows. This allows the application to avoid the performance overhead associated with repeatedly allocating and freeing memory.

To increase the accuracy of the estimated number of QueryResults rows, an application can pass the value of the action_count column returned by the EnumQueueReaderAgentSessions method to the lEstimatedNumRecords parameter.

Note

If an application calls EnumQueueReaderAgentSessionDetailson an instance of SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000 or later" are returned.