Restore.KeepReplication 属性

Gets or sets a Boolean property value that specifies whether to maintain a replication configuration during a restore operation.

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.SmoExtended(在 Microsoft.SqlServer.SmoExtended.dll 中)

语法

声明
Public Property KeepReplication As Boolean 
    Get 
    Set
用法
Dim instance As Restore 
Dim value As Boolean 

value = instance.KeepReplication

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

属性值

类型:System.Boolean
A Boolean value that indicates whether to keep the replication configuration.If True, the replication configuration is kept in place.If False (default), the replication configuration is ignored by the restore operation.

示例

The following code example demonstrates how to set a replication configuration so that it will be saved during a restore operation.

VB

Dim rs As Restore
rs = New Restore
rs.KeepReplication = true

PowerShell

$rs = new-object Microsoft.SqlServer.Management.Smo.Restore
$rs.KeepReplication = $TRUE

请参阅

参考

Restore 类

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

RESTORE (Transact-SQL)

SQL Server 数据库的备份和还原