CreateAgentProfile Method
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
The CreateAgentProfile method creates a replication agent profile.
구문
object
.CreateAgentProfile(
bstrName
,
bstrDescription
,
ReplAgentType
)
as
Long
Parts
- object
Expression that evaluates to an object in the Applies To list.
- bstrName
String that specifies profile name.
- bstrDescription
String that contains descriptive text.
- ReplAgentType
Long integer that specifies a replication agent type as described in Settings.
Prototype (C/C++)
HRESULT CreateAgentProfile(SQLDMO_LPCSTR szName,
SQLDMO_LPCSTR szDescription,
SQLDMO_REPLAGENT_TYPE AgentType, long *plProfileID);
Settings
Set the ReplAgentType argument using these SQLDMO_REPLAGENT_TYPE values.
Constant | Value | Description |
---|---|---|
SQLDMOReplAgent_Distribution |
3 |
Replication Distribution Agent |
SQLDMOReplAgent_LogReader |
2 |
Replication transaction log monitoring agent |
SQLDMOReplAgent_Merge |
4 |
Replication Merge Agent |
SQLDMOReplAgent_QueueReader |
9 |
Replication Queue Reader Agent |
SQLDMOReplAgent_Snapshot |
1 |
Replication Snapshot Agent |
Returns
A system-generated, long integer that identifies the agent profile.
주의
Use the CreateAgentProfile method to add a replication agent profile to a Distributor. The new profile is a copy of the default profile in use for the agent.
Use the ChangeAgentParameter method to modify parameter values and change the behaviors configured by the newly created profile.