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
'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);
}
/** @property */
public int get_RetentionInDays ()

/** @property */
public void set_RetentionInDays (int value)
public function get RetentionInDays () : int

public function set RetentionInDays (value : int)

Property Value

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

Example

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
SqlSyncStoreMetadataCleanup Members
Microsoft.Synchronization.Data.SqlServer Namespace