Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
KeepReplication Property

Restore.KeepReplication Property

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

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)

public bool KeepReplication { get; set; }

Property Value

Type: 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.


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


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

Community Additions

© 2015 Microsoft