EnumAgentProfiles Method (SQL-DMO)

The EnumAgentProfiles method returns a QueryResults object enumerating agent session logging configurations available on a Microsoft® SQL Server™ installation monitoring replication.

Applies To

Distributor Object

Syntax

object.EnumAgentProfiles ( [ AgentType ] ) as QueryResults

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

Settings

When setting AgentType, specify result set membership by using these 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_Snapshot 1 Result set enumerates Snapshot Agent profiles.

Returns

A QueryResults object containing one result set defined by these columns.

Column Data type Description
profile_id integer System-generated profile identifier.
profile_name nvarchar(129) Profile name.
agent_type integer Kind of replication agent using the profile. Interpret by using SQLDMO_
REPLAGENT_TYPE.
type integer When 0, the profile is a system object. When 1, the profile is a user-defined object..
description nvarchar(3001) Descriptive text.
def_profile bit When True, profile is used by default.

Prototype (C/C++)

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

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.