EnumAgentProfiles Method
Diese Funktion wird in zukünftigen Versionen von Microsoft SQL Server nicht mehr bereitgestellt. Verwenden Sie diese Funktion beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.
The EnumAgentProfiles method returns a QueryResults object that enumerates agent session logging configurations available on an instance of Microsoft SQL Server monitoring replication.
Syntax
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. |