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.
Assembly: Microsoft.Synchronization.Data.SqlServer (in Microsoft.Synchronization.Data.SqlServer.dll)
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: