Freigeben über


VacuumScheduleCollection.Add Method

Adds a VacuumSchedule to the VacuumScheduleCollection.

Namespace: Microsoft.SqlServer.Management.Nmo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Syntax

'Declaration
Public Sub Add ( _
    vacuumSchedule As VacuumSchedule _
)
public void Add (
    VacuumSchedule vacuumSchedule
)
public:
void Add (
    VacuumSchedule^ vacuumSchedule
)
public void Add (
    VacuumSchedule vacuumSchedule
)
public function Add (
    vacuumSchedule : VacuumSchedule
)

Parameter

Hinweise

If you add VacuumSchedule objects after deploying the application, you must Update the instance to apply the changes.

Beispiel

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)

Threadsicherheit

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.

Plattformen

Entwicklungsplattformen

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Zielplattforme

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Siehe auch

Verweis

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

Andere Ressourcen

Konfigurieren der Datenentfernung
Schedule Element for VacuumSchedule (ADF)