共用方式為


EnumAgentProfiles Method

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The EnumAgentProfiles method returns a QueryResults object that enumerates agent session logging configurations available on an instance of Microsoft SQL Server monitoring replication.

語法

object
.EnumAgentProfiles( [ AgentType ] )as QueryResults

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • AgentType
    Optional. Restricts result set membership as described in Settings.

Prototype (C/C++)

HRESULT EnumAgentProfiles(
LPSQLDMOQUERYRESULTS* ppResults,
SQLDMO_REPLAGENT_TYPE AgentType = SQLDMOReplAgent_All);

Settings

When setting AgentType, specify result set membership using these SQLDMO_REPLAGENT_TYPE values.

Constant Value Description

SQLDMOReplAgent_All

0

Default. Result set enumerates all agent profiles.

SQLDMOReplAgent_Distribution

3

Result set enumerates Distribution Agent profiles.

SQLDMOReplAgent_LogReader

2

Result set enumerates Log Reader Agent profiles.

SQLDMOReplAgent_Merge

4

Result set enumerates Merge Agent profiles.

SQLDMOReplAgent_QueueReader

9

Replication Queue Reader Agent.

SQLDMOReplAgent_Snapshot

1

Result set enumerates Snapshot Agent profiles.

Returns

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

Column Data type Description

agent_type

integer

Type of replication agent using the profile. Interpret using SQLDMO_REPLAGENT_TYPE.

def_profile

bit

When TRUE, profile is used by default.

description

nvarchar(3001)

Descriptive text.

profile_id

integer

System-generated profile identifier.

profile_name

nvarchar(129)

Profile name.

type

integer

When 0, the profile is a system object. When 1, the profile is a user-defined object.

Applies To:

Distributor Object