次の方法で共有


EnumDistributionAgentViews2 Method

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

The EnumDistributionAgentViews2 method returns a QueryResults object that enumerates historical data for all Distribution Agents.

構文

object
.EnumDistributionAgentViews2( [ fExcludeAnonymous ] )asQueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • fExcludeAnonymous
    Boolean that specifies whether anonymous Distribution Agent views are enumerated. Default = FALSE.

Prototype (C/C++)

HRESULT EnumDistributionAgentViews2(
LPSQLDMOQUERYRESULTS *ppResults, 
BOOL fExcludeAnonymous);

Returns

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

Column Data type Description

agent_id

integer

Agent identifier.

average_commands

integer

Average number of commands delivered to the Subscriber.

comments

nvarchar(256)

Descriptive text.

dbname

nvarchar(129)

Name of the database used for distribution.

delivered_commands

integer

Cumulative number of commands delivered to the Subscriber.

delivered_transactions

integer

Cumulative number of transactions delivered to the Subscriber.

delivery_latency

integer

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

delivery_rate

integer

Average number of commands per transaction delivered per second.

delivery_time

integer

Cumulative time spent delivering transactions to the Subscriber in seconds.

duration

integer

Cumulative run time in seconds.

error_id

integer

When nonzero, the Microsoft SQL Server error message number of the most recent error.

job_id

binary(22)

Identifier of the SQL Server Agent job that starts the replication agent.

local_job

bit

When TRUE, the SQL Server Agent job executes at the Distributor. When FALSE, the SQL Server Agent job executes at the Subscriber.

local_timestamp

binary(14)

Timestamp.

name

nvarchar(101)

Name of the Distribution Agent.

profile_id

integer

Profile identifier. Links this agent to the Agent Profile used to establish runtime parameters such as timeout and batch size values.

publication

nvarchar(129)

Publication name.

publisher

nvarchar(129)

Publisher name.

publisher_db

nvarchar(129)

Name of database published.

start_time

nvarchar(25)

Date and time at which agent started.

status

integer

Agent status. Interpret using SQLDMO_TASKSTATUS_TYPE.

subscriber

nvarchar(129)

Subscriber name.

subscriber_db

nvarchar(129)

Name of database that stores replicated image.

subscription_type

integer

Type of subscription. Interpret using SQLDMO_SUBSCRIPTION_TYPE.

time

nvarchar(25)

Date and time latest message logged.

解説

The EnumDistributionAgentViews2 method extends the functionality of the EnumDistributionAgentViews method by including the optional fExcludeAnonymous parameter. When fExcludeAnonymous is set to TRUE, anonymous Distribution Agent views are not enumerated.

In the result set, date and time data returned in start_time and 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.

ms141133.note(ja-jp,SQL.90).gifメモ :
If an application calls EnumDistributionAgentViews2 on 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.

Applies To:

Distributor2 Object

参照

関連項目

EnumDistributionAgentViews Method

ヘルプおよび情報

SQL Server 2005 の参考資料の入手