次の方法で共有


EnumDistributionAgentSessionDetails2 Method

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The EnumDistributionAgentSessionDetails2 method returns a QueryResults object that enumerates detail information for a specified Distribution Agent session.

構文

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

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • AgentName
    String that identifies a Distributor Agent session by name.
  • SessionID
    String that identifies a session. The SessionID value is specified using the first 21 characters of the time column value in the QueryResults result set returned by the EnumDistributionAgentSessions2 method.
  • lEstimatedNumRecords
    Long integer that specifies the estimated number of QueryResults rows to return.

Prototype (C/C++)

HRESULT EnumDistributionAgentSessionDetails2(
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

reserved

integer

Reserved. Always returns 0.

average_commands

integer

Average number of commands per transaction delivered in the session.

comments

nvarchar(256)

Descriptive text.

delivered_/commands

integer

Cumulative number of commands delivered in the session.

delivered_/transactions

integer

Cumulative number of transactions delivered in the session.

delivery_latency

integer

Latency, in milliseconds, between the transaction entering the distribution database and being applied to the Subscriber.

delivery_rate

float

Average number of commands delivered per second.

duration

integer

Elapsed time of the logged session activity in seconds.

error_id

integer

When nonzero, Microsoft SQL Server error message number.

runstatus

integer

Executing state. Interpret using SQLDMO_TASKSTATUS_TYPE.

time

nvarchar(26)

Time of logging for session detail.

解説

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 EnumDistributionAgentSessionDetails2 method differs from the EnumDistributionAgentSessionDetails 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.

Applies To:

DistributionPublisher2 Object