Share via


SqlSyncStoreMetadataCleanup.RetentionInDays Property

Gets or sets how old change-tracking metadata must be, in days, for that metadata to be deleted when PerformCleanup is called.

Namespace:  Microsoft.Synchronization.Data.SqlServer
Assembly:  Microsoft.Synchronization.Data.SqlServer (in Microsoft.Synchronization.Data.SqlServer.dll)

Syntax

'Declaration
Public Property RetentionInDays As Integer
    Get
    Set
'Usage
Dim instance As SqlSyncStoreMetadataCleanup
Dim value As Integer

value = instance.RetentionInDays

instance.RetentionInDays = value
public int RetentionInDays { get; set; }
public:
property int RetentionInDays {
    int get ();
    void set (int value);
}
member RetentionInDays : int with get, set
function get RetentionInDays () : int
function set RetentionInDays (value : int)

Property Value

Type: System.Int32
The number of days old that change-tracking metadata must be for that metadata to be deleted.

Examples

The following code example calls PerformCleanup for metadata that is more than 7 days old. To view this code in the context of a complete example, see How to: Clean Up Metadata for Collaborative Synchronization (SQL Server).

SqlSyncStoreMetadataCleanup metadataCleanup = new SqlSyncStoreMetadataCleanup(serverConn);
bool cleanupSuccessful;
metadataCleanup.RetentionInDays = 7;
cleanupSuccessful = metadataCleanup.PerformCleanup();
Dim metadataCleanup As New SqlSyncStoreMetadataCleanup(serverConn)
Dim cleanupSuccessful As Boolean
metadataCleanup.RetentionInDays = 7
cleanupSuccessful = metadataCleanup.PerformCleanup()

See Also

Reference

SqlSyncStoreMetadataCleanup Class

Microsoft.Synchronization.Data.SqlServer Namespace