TransPublication 构造函数

定义

创建 TransPublication 类的新实例。

重载

TransPublication()

创建 TransPublication 类的新实例。

TransPublication(String, String, ServerConnection)

使用所需的属性创建 TransPublication 类的新实例。

TransPublication(String, String, ServerConnection, Boolean)

使用所需的属性创建 TransPublication 类的新实例,并且指示是否为发布创建快照代理作业。

注解

已更新的文本: 2006 年 7 月 17日

下表显示的新实例的默认属性值 TransPublication 。 未在此表中显式枚举的任何属性都将初始化为 null 值。

属性 默认值
Attributes AllowPushSnapshotInDefaultFolder 的值

PublicationAttributes
CachePropertyChanges false
ConflictPolicy 的值 PublisherWinConflictPolicyOption
ConflictRetention 14(天)
ContinueOnConflict false
CreateSnapshotAgentByDefault false
FtpPort 1 21
HasSubscription false
IsExistingObject false
QueueType 的值 SqlQueueOption
ReplicateDdl 的值 AllDdlReplicationOptions
RetentionPeriod 0(永不过期)
SnapshotAgentExists false
SnapshotAvailable false
SnapshotGenerationAgentPublisherSecurity 的值 trueWindowsAuthentication
SnapshotMethod 的值 BcpNativeInitialSyncType
SnapshotSchedule 为99991231的值ActiveEndDate

为235959的值ActiveEndTime

值0表示ActiveStartDate

值0表示ActiveStartTime

值为1表示FrequencyInterval

值0表示FrequencyRecurrenceFactor

的值 FirstFrequencyRelativeInterval

的值 HourFrequencySubDay

值为1表示FrequencySubDayInterval

的值 DailyFrequencyType
Status 的值 ActiveState
Type 的值 TransactionalPublicationType

1仅当使用 ftp 传输快照时才使用 ftp (文件传输协议)端口。 有关详细信息,请参阅通过 FTP 传输快照

TransPublication()

创建 TransPublication 类的新实例。

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

适用于

TransPublication(String, String, ServerConnection)

使用所需的属性创建 TransPublication 类的新实例。

public:
 TransPublication(System::String ^ name, System::String ^ databaseName, Microsoft::SqlServer::Management::Common::ServerConnection ^ connectionContext);
public TransPublication (string name, string databaseName, Microsoft.SqlServer.Management.Common.ServerConnection connectionContext);
new Microsoft.SqlServer.Replication.TransPublication : string * string * Microsoft.SqlServer.Management.Common.ServerConnection -> Microsoft.SqlServer.Replication.TransPublication
Public Sub New (name As String, databaseName As String, connectionContext As ServerConnection)

参数

name
String

一个 String 值,该值指定发布的名称。

databaseName
String

一个指定发布数据库名称的 String 值。

connectionContext
ServerConnection

一个 ServerConnection 对象,该对象表示与发布服务器的连接,而对于非 SQL Server 发布服务器,则表示与分发服务器的连接。

适用于

TransPublication(String, String, ServerConnection, Boolean)

使用所需的属性创建 TransPublication 类的新实例,并且指示是否为发布创建快照代理作业。

public:
 TransPublication(System::String ^ name, System::String ^ databaseName, Microsoft::SqlServer::Management::Common::ServerConnection ^ connectionContext, bool createSnapshotAgentByDefault);
public TransPublication (string name, string databaseName, Microsoft.SqlServer.Management.Common.ServerConnection connectionContext, bool createSnapshotAgentByDefault);
new Microsoft.SqlServer.Replication.TransPublication : string * string * Microsoft.SqlServer.Management.Common.ServerConnection * bool -> Microsoft.SqlServer.Replication.TransPublication
Public Sub New (name As String, databaseName As String, connectionContext As ServerConnection, createSnapshotAgentByDefault As Boolean)

参数

name
String

一个 String 值,该值指定发布的名称。

databaseName
String

一个指定发布数据库名称的 String 值。

connectionContext
ServerConnection

一个 ServerConnection 对象,该对象表示与发布服务器的连接,而对于非 SQL Server 发布服务器,则表示与分发服务器的连接。

createSnapshotAgentByDefault
Boolean

一个指示在创建发布时是否自动添加快照代理作业的 Boolean 值。

适用于