Поделиться через


Метод 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.

Пример

В следующем примере кода вызывается метод PerformCleanup для метаданных, срок хранения которых превышает 7 дней. Чтобы просмотреть этот код в контексте полного примера, см. раздел Как очищать метаданные для синхронизации совместной работы (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