EnumMergeAgentSessionDetails2 Method

SQL-DMO

SQL-DMO

EnumMergeAgentSessionDetails2 Method

The EnumMergeAgentSessionDetails2 method returns a QueryResults object that enumerates detail information for a specified merge replication agent session.

Applies To
DistributionPublisher2 Object
Syntax

object.EnumMergeAgentSessionDetails2(
AgentName,
SessionID,
lEstimatedNumRecords ) as QueryResults

Parts

object

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

AgentName

String that identifies a merge replication agent session by name.

SessionID

String that identifies a session. The SessionID value is specified using the first 23 characters of the time column value in the QueryResults result set returned by the EnumMergeAgentSessions2 method.

lEstimatedNumRecords

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

Prototype (C/C++)

HRESULT EnumMergeAgentSessionDetails2(
SQLDMO_LPCSTR AgentName,
SQLDMO_LPCSTR SessionID,
long lEstimatedNumRecords,
LPSQLDMOQUERYRESULTS* ppResults);

Returns

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

Column Data type Description
average_rows integer Average number of rows per second.
comments nvarchar(256) Descriptive text.
duration integer Elapsed time of the session in seconds.
error_id integer When nonzero, Microsoft® SQL Server™ 2000 error message number.
publisher_conficts integer Number of conflicts at the Publisher.
publisher_deletecount integer Number of deletes at the Publisher.
publisher_insertcount integer Number of inserts at the Publisher.
publisher_updatecount integer Number of updates at the Publisher.
runstatus integer Executing state. Interpret using SQLDMO_TASKSTATUS_TYPE.
subscriber_conflicts integer Number of conflicts at the Subscriber.
subscriber_deletecount integer Number of deletes at the Subscriber.
subscriber_insertcount integer Number of inserts at the Subscriber.
subscriber_updatecount integer Number of updates at the Subscriber.
time nvarchar(26) Time of message logging.

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 19990911 18:12:00.000 is interpreted as 6:12 P.M., September 11, 1999.

The EnumMergeAgentSessionDetails2 method differs from the EnumMergeAgentSessionDetails method by including 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.