共用方式為


CreateSyncAgentByDefault 屬性

Gets or sets whether the agent job used to synchronize the subscription is created by default.

命名空間:  Microsoft.SqlServer.Replication
組件:  Microsoft.SqlServer.Rmo (在 Microsoft.SqlServer.Rmo.dll 中)

語法

'宣告
Public Property CreateSyncAgentByDefault As Boolean
    Get
    Set
'用途
Dim instance As Subscription
Dim value As Boolean

value = instance.CreateSyncAgentByDefault

instance.CreateSyncAgentByDefault = value
public bool CreateSyncAgentByDefault { get; set; }
public:
property bool CreateSyncAgentByDefault {
    bool get ();
    void set (bool value);
}
member CreateSyncAgentByDefault : bool with get, set
function get CreateSyncAgentByDefault () : boolean
function set CreateSyncAgentByDefault (value : boolean)

屬性值

型別:System. . :: . .Boolean
A Boolean value. If true, the agent job is created. If false, the agent job is not created.

備註

The CreateSyncAgentByDefault property is only used when a new subscription is created.

The default value for CreateSyncAgentByDefault is true.

When an agent job is created, metadata required by Microsoft SQL Server Agent to synchronize the subscription is stored in the MSsubscription_properties table. When you create a subscription and specify a value of false for CreateSyncAgentByDefault, a data row is not added to the MSsubscription_properties table for the subscription. In this case, many of the properties of the MergeSubscription or TransSubscription object that represent a subscription cannot be saved on the server. To persist any of the subscription properties in the MSsubscription_properties table, you must specify a value of true for CreateSyncAgentByDefault.