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)

public:
property int RetentionInDays {
	int get ();
	void set (int value);
}

Property Value

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

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()


Show: