MergePublication MergePublication MergePublication Constructors

Definition

Overloads

MergePublication() MergePublication() MergePublication()

Creates a new instance of the MergePublication class.

MergePublication(String, String, ServerConnection) MergePublication(String, String, ServerConnection) MergePublication(String, String, ServerConnection)

Initializes a new instance of the MergePublication class with the specified name, database, and connection to the Publisher.

MergePublication(String, String, ServerConnection, Boolean) MergePublication(String, String, ServerConnection, Boolean) MergePublication(String, String, ServerConnection, Boolean)

Creates an instance of the MergePublication class, specifying whether the Snapshot Agent job should be created by default.

Remarks

Updated text: 17 July 2006

The following table shows the default property values for a new instance of MergePublication. Any properties that are not explicitly enumerated in this table are initialized to a null value.

Property Default value
Attributes Values of AllowPush, CentralizedConflicts, DecentralizedConflicts, IndependentAgent, ImmediateSync, and AllowPartitionRealignment for

PublicationAttributes
AutomaticReinitializationPolicy A value of Reinitialize for AutomaticReinitializationPolicies
CachePropertyChanges false
CompatibilityLevel A value of LatestVersion for PublicationCompatibilityLevel
ConflictRetention 14 (days)
CreateSnapshotAgentByDefault false
FtpPort 1 21
HasSubscription false
IsExistingObject false
MaxConcurrentDynamicSnapshots 0 (no maximum)
MaxConcurrentMerge 0 (no maximum)
PartitionGroupsOption A value of AutoSet for PartitionGroupsOption
Priority 100
ReplicateDdl A value of All for DdlReplicationOptions
RetentionPeriod 14 (days)
RetentionPeriodUnit A value of Days for RetentionPeriodUnits
SnapshotAgentExists false
SnapshotAvailable false
SnapshotGenerationAgentPublisherSecurity A value of true for WindowsAuthentication
SnapshotMethod A value of BcpNative for InitialSyncType
SnapshotSchedule A value of 99991231 for ActiveEndDate

A value of 235959 for ActiveEndTime

A value of the publication creation date for ActiveStartDate

A value of 500 for ActiveStartTime

A value of 14 for FrequencyInterval

A value of 0 for FrequencyRecurrenceFactor

A value of First for FrequencyRelativeInterval

A value of Once for FrequencySubDay

A value of 5 for FrequencySubDayInterval

A value of Daily for FrequencyType
Status A value of Active for State
Type A value of Merge for PublicationType
UsesHostName false

1 The FTP (file transfer protocol) port is used only when you transfer snapshots by using FTP. For more information, see Transfer Snapshots Through FTP.

MergePublication() MergePublication() MergePublication()

Creates a new instance of the MergePublication class.

public:
 MergePublication();
public MergePublication ();
Public Sub New ()

Remarks

The default constructor initializes any fields to their default values.

MergePublication(String, String, ServerConnection) MergePublication(String, String, ServerConnection) MergePublication(String, String, ServerConnection)

Initializes a new instance of the MergePublication class with the specified name, database, and connection to the Publisher.

public:
 MergePublication(System::String ^ name, System::String ^ databaseName, Microsoft::SqlServer::Management::Common::ServerConnection ^ connectionContext);
public MergePublication (string name, string databaseName, Microsoft.SqlServer.Management.Common.ServerConnection connectionContext);
Public Sub New (name As String, databaseName As String, connectionContext As ServerConnection)
Parameters
name
String String String

The name of the merge publication.

databaseName
String String String

The name of the database.

connectionContext
Microsoft.SqlServer.Management.Common.ServerConnection Microsoft.SqlServer.Management.Common.ServerConnection Microsoft.SqlServer.Management.Common.ServerConnection

The connection context required to establish a connection to the instance of MicrosoftSQL Server.

See Also

MergePublication(String, String, ServerConnection, Boolean) MergePublication(String, String, ServerConnection, Boolean) MergePublication(String, String, ServerConnection, Boolean)

Creates an instance of the MergePublication class, specifying whether the Snapshot Agent job should be created by default.

public:
 MergePublication(System::String ^ name, System::String ^ databaseName, Microsoft::SqlServer::Management::Common::ServerConnection ^ connectionContext, bool createSnapshotAgentByDefault);
public MergePublication (string name, string databaseName, Microsoft.SqlServer.Management.Common.ServerConnection connectionContext, bool createSnapshotAgentByDefault);
Public Sub New (name As String, databaseName As String, connectionContext As ServerConnection, createSnapshotAgentByDefault As Boolean)
Parameters
name
String String String

The name of the merge publication.

databaseName
String String String

The name of the database.

connectionContext
Microsoft.SqlServer.Management.Common.ServerConnection Microsoft.SqlServer.Management.Common.ServerConnection Microsoft.SqlServer.Management.Common.ServerConnection

The connection context required to establish a connection to the instance of MicrosoftSQL Server.

createSnapshotAgentByDefault
Boolean Boolean Boolean

true to create the Snapshot Agent job for the publication; false to not create the Snapshot Agent job for the publication and the Snapshot Agent must be run manually to generate the initial snapshot.

Applies to