VacuumSchedule.StartTime Property

Gets or sets the daily time, in Universal Coordinated Time (UTC), for the data removal process to start.

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

语法

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

/** @property */
public void set_StartTime (TimeSpan value)
public function get StartTime () : TimeSpan

public function set StartTime (value : TimeSpan)

属性值

A TimeSpan object that specifies the time of day for the vacuum process to start.

备注

The start time must be specified in UTC.

If you indicate a date as well as a time for this value, Notification Services uses only the time portion. The data removal process starts at the specified time on the current day.

示例

The following examples show how to create a schedule for removing obsolete data and then add the schedule to the collection of vacuum schedules for the application:

VacuumSchedule vacuumSchedule1 = new VacuumSchedule(
    myApplication, "1");
vacuumSchedule1.StartTime = new TimeSpan(23, 0, 0);
myApplication.VacuumSchedules.Add(vacuumSchedule1);
Dim vacuumSchedule1 As VacuumSchedule = _
    New VacuumSchedule(myApplication, "1")
vacuumSchedule1.StartTime = New TimeSpan(23, 0, 0)
myApplication.VacuumSchedules.Add(vacuumSchedule1)

线程安全

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 的硬件和软件要求。

请参阅

参考

VacuumSchedule Class
VacuumSchedule Members
Microsoft.SqlServer.Management.Nmo Namespace

其他资源

配置数据删除操作
StartTime Element for VacuumSchedule/Schedule (ADF)