Share via


SqlSyncStoreMetadataCleanup.PerformCleanup メソッド

データベースから変更追跡メタデータを削除し、クリーンアップ ナレッジを更新してクリーンアップ プロセスが停止したポイントを反映します。

名前空間: Microsoft.Synchronization.Data.SqlServer
アセンブリ: Microsoft.Synchronization.Data.SqlServer (microsoft.synchronization.data.sqlserver.dll 内)

構文

'宣言
<SuppressMessageAttribute("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")> _
<SuppressMessageAttribute("Microsoft.MSInternal", "CA908:UseApprovedGenericsForPrecompiledAssemblies")> _
Public Function PerformCleanup As Boolean
'使用
Dim instance As SqlSyncStoreMetadataCleanup
Dim returnValue As Boolean

returnValue = instance.PerformCleanup
[SuppressMessageAttribute("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")] 
[SuppressMessageAttribute("Microsoft.MSInternal", "CA908:UseApprovedGenericsForPrecompiledAssemblies")] 
public bool PerformCleanup ()
[SuppressMessageAttribute(L"Microsoft.Maintainability", L"CA1506:AvoidExcessiveClassCoupling")] 
[SuppressMessageAttribute(L"Microsoft.MSInternal", L"CA908:UseApprovedGenericsForPrecompiledAssemblies")] 
public:
bool PerformCleanup ()
/** @attribute SuppressMessageAttribute("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling") */ 
/** @attribute SuppressMessageAttribute("Microsoft.MSInternal", "CA908:UseApprovedGenericsForPrecompiledAssemblies") */ 
public boolean PerformCleanup ()
SuppressMessageAttribute("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling") 
SuppressMessageAttribute("Microsoft.MSInternal", "CA908:UseApprovedGenericsForPrecompiledAssemblies") 
public function PerformCleanup () : boolean

戻り値

メタデータのクリーンアップが正常に実行された場合は true。それ以外の場合は false

次のコード例では、保有期間が 7 日を超えているメタデータに対して PerformCleanup を呼び出します。完全なコンテキスト例でこのコードを表示するには、「コラボレーション同期のメタデータをクリーンアップする方法 (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()

参照

リファレンス

SqlSyncStoreMetadataCleanup クラス
SqlSyncStoreMetadataCleanup メンバー
Microsoft.Synchronization.Data.SqlServer 名前空間