SqlCeSyncStoreMetadataCleanup Class

Represents cleanup of change-tracking metadata in a SQL Server Compact database that is synchronized by using a SqlCeSyncProvider.

System.Object
  Microsoft.Synchronization.Data.SqlServerCe.SqlCeSyncStoreMetadataCleanup

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

'Declaration
Public Class SqlCeSyncStoreMetadataCleanup
'Usage
Dim instance As SqlCeSyncStoreMetadataCleanup

The SqlCeSyncStoreMetadataCleanup type exposes the following members.

  NameDescription
Public methodSqlCeSyncStoreMetadataCleanup(SqlCeConnection)Initializes a new instance of the SqlCeSyncStoreMetadataCleanup class with the specified connection.
Public methodSqlCeSyncStoreMetadataCleanup(SqlCeConnection, String)Initializes a new instance of the SqlCeSyncStoreMetadataCleanup class with the specified connection and object prefix.
Public methodSqlCeSyncStoreMetadataCleanup(SqlCeConnection, String, Int32)Initializes a new instance of the SqlCeSyncStoreMetadataCleanup class with the specified connection, object prefix, and metadata retention period.
Top

  NameDescription
Public propertyConnectionGets or sets a SqlCeConnection object that contains a connection to the database.
Public propertyObjectPrefixGets or sets the optional prefix that is used to identify objects that Sync Framework creates.
Public propertyRetentionInDaysGets or sets how old change-tracking metadata must be, in days, for that metadata to be deleted when PerformCleanup is called.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPerformCleanupRemoves change-tracking metadata from the database and updates the cleanup knowledge to reflect the point where the cleanup process stopped.
Public methodToString (Inherited from Object.)
Top

Cleanup involves deleting metadata for rows that have been deleted from a base table. Sync Framework uses two kinds of metadata:

  • Table-level metadata that tracks inserts, updates, and deletes for each table that is synchronized.

    There is one row of metadata for each row in the base table. If a row is deleted from the base table and all nodes in all scopes have received it, the metadata row can be safely deleted.

  • Database-level metadata that tracks which changes each node has received from other nodes.

    This metadata is typically stored in one scope table for each node database. Rows in the scope table should never be deleted unless the scope is dropped.

Cleanup is retention-based, which means that metadata that is older than the specified number of days is deleted. For SQL Server databases, use the SqlSyncStoreMetadataCleanup object; and for SQL Server Compact databases, use the SqlCeSyncStoreMetadataCleanup object. For more information, see How to: Clean Up Metadata for Collaborative Synchronization (SQL Server).

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: