Application.VacuumRetentionAge Property

Gets or sets the minimum age at which event and notification data is considered to be obsolete and available for removal.

命名空间: Microsoft.SqlServer.Management.Nmo
程序集: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

语法

声明
Public Property VacuumRetentionAge As TimeSpan
public TimeSpan VacuumRetentionAge { get; set; }
public:
property TimeSpan VacuumRetentionAge {
    TimeSpan get ();
    void set (TimeSpan value);
}
/** @property */
public TimeSpan get_VacuumRetentionAge ()

/** @property */
public void set_VacuumRetentionAge (TimeSpan value)
public function get VacuumRetentionAge () : TimeSpan

public function set VacuumRetentionAge (value : TimeSpan)

属性值

A TimeSpan object that specifies the retention age.

备注

已更新的文本:2005 年 12 月 5 日

If you specify VacuumSchedules, you also can specify the data retention age.

Data is retained for the time span specified by the retention age, although it is not necessarily removed immediately upon expiration. When the data removal process runs, it attempts to delete event and notification data that is older than the retention age.

If you use the Application(Instance,String) constructor, the default value is 7 days, if you configure vacuuming. If you use the default constructor, you must set this property.

示例

The following examples show how to set all application execution settings, including the vacuum retention age:

// Define application execution settings
myApplication.QuantumDuration = new TimeSpan(0, 0, 15);
myApplication.PerformanceQueryInterval = new TimeSpan(0, 0, 5);
myApplication.SubscriptionQuantumLimit = 1;
myApplication.ChronicleQuantumLimit = 1;
myApplication.VacuumRetentionAge = new TimeSpan(0, 0, 1);
myApplication.LogBeforeDeliveryAttempts = false;
myApplication.LogNotificationText = false;
myApplication.LogStatusInfo = false;
myApplication.EventThrottle = 500;
myApplication.NotificationThrottle = 500;
myApplication.SubscriptionThrottle = 500;
myApplication.ProcessEventsInOrder = false;
' Define application execution settings
myApplication.QuantumDuration = New TimeSpan(0, 0, 15)
myApplication.PerformanceQueryInterval = New TimeSpan(0, 0, 5)
myApplication.SubscriptionQuantumLimit = 1
myApplication.ChronicleQuantumLimit = 1
myApplication.VacuumRetentionAge = New TimeSpan(0, 0, 1)
myApplication.LogBeforeDeliveryAttempts = False
myApplication.LogNotificationText = False
myApplication.LogStatusInfo = False
myApplication.EventThrottle = 500
myApplication.NotificationThrottle = 500
myApplication.SubscriptionThrottle = 500
myApplication.ProcessEventsInOrder = False

线程安全

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

平台

开发平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

目标平台

有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。

请参阅

参考

Application Class
Application Members
Microsoft.SqlServer.Management.Nmo Namespace
VacuumSchedules

其他资源

配置数据删除操作
RetentionAge Element (ADF)