Share via


VacuumSchedule.Interval Property

Gets or sets the duration the data removal process is allowed to run after it has been started.

Espace de noms: Microsoft.SqlServer.Management.Nmo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntaxe

'Déclaration
Public Property Interval As TimeSpan
public TimeSpan Interval { get; set; }
public:
property TimeSpan Interval {
    TimeSpan get ();
    void set (TimeSpan value);
}
/** @property */
public TimeSpan get_Interval ()

/** @property */
public void set_Interval (TimeSpan value)
public function get Interval () : TimeSpan

public function set Interval (value : TimeSpan)

Valeur de propriété

A TimeSpan object that specifies how long the vacuum process is allowed to run.

Notes

The interval specifies the length of the vacuuming period, and cannot exceed 24 hours.

Vacuuming schedules cannot overlap. If schedules overlap, Notification Services stops the earlier vacuuming process before the later one starts.

Exemple

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)

Sécurité des threads

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.

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

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

Autres ressources

Configuration de la suppression de données
Duration Element (ADF)